测试
This commit is contained in:
parent
1c16fc1d4a
commit
8918116dbd
33
demo/.gitignore
vendored
Normal file
33
demo/.gitignore
vendored
Normal file
@ -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/
|
BIN
demo/.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
BIN
demo/.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
Binary file not shown.
2
demo/.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
2
demo/.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
|
316
demo/mvnw
vendored
Normal file
316
demo/mvnw
vendored
Normal file
@ -0,0 +1,316 @@
|
||||
#!/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 /usr/local/etc/mavenrc ] ; then
|
||||
. /usr/local/etc/mavenrc
|
||||
fi
|
||||
|
||||
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="`\\unset -f command; \\command -v 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/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
else
|
||||
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.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" || rm -f "$wrapperJarPath"
|
||||
else
|
||||
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$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 \
|
||||
$MAVEN_DEBUG_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
"-Dmaven.home=${M2_HOME}" \
|
||||
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
188
demo/mvnw.cmd
vendored
Normal file
188
demo/mvnw.cmd
vendored
Normal file
@ -0,0 +1,188 @@
|
||||
@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 "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
|
||||
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\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/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
|
||||
FOR /F "usebackq 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%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.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 "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
|
||||
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\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%
|
||||
|
||||
cmd /C exit /B %ERROR_CODE%
|
41
demo/pom.xml
Normal file
41
demo/pom.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.7.0</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>demo</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>demo</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
13
demo/src/main/java/com/example/demo/DemoApplication.java
Normal file
13
demo/src/main/java/com/example/demo/DemoApplication.java
Normal file
@ -0,0 +1,13 @@
|
||||
package com.example.demo;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class DemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DemoApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
1
demo/src/main/resources/application.properties
Normal file
1
demo/src/main/resources/application.properties
Normal file
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.example.demo;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class DemoApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
8
pom.xml
8
pom.xml
@ -18,13 +18,13 @@
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>11</java.version>
|
||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||
<druid.version>1.2.8</druid.version>
|
||||
<druid.version>1.2.11</druid.version>
|
||||
<bitwalker.version>1.21</bitwalker.version>
|
||||
<swagger.version>3.0.0</swagger.version>
|
||||
<kaptcha.version>2.3.2</kaptcha.version>
|
||||
<mybatis-spring-boot.version>2.2.2</mybatis-spring-boot.version>
|
||||
<pagehelper.boot.version>1.4.1</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.80</fastjson.version>
|
||||
<pagehelper.boot.version>1.4.2</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.83</fastjson.version>
|
||||
<oshi.version>6.1.6</oshi.version>
|
||||
<commons.io.version>2.11.0</commons.io.version>
|
||||
<commons.fileupload.version>1.4</commons.fileupload.version>
|
||||
@ -42,7 +42,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>2.5.13</version>
|
||||
<version>2.5.14</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -17,7 +17,27 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
|
||||
<groupId>org.apache.poi</groupId>
|
||||
|
||||
<artifactId>poi</artifactId>
|
||||
|
||||
<version>4.0.1</version>
|
||||
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
<groupId>org.apache.poi</groupId>
|
||||
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
|
||||
<version>4.0.1</version>
|
||||
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
@ -34,7 +54,19 @@
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>1.6.2</version>
|
||||
<version>1.6.6</version>
|
||||
</dependency>
|
||||
<!-- knife4j -->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
<!-- postgresql驱动包-->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.2.20</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
@ -10,21 +11,25 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
* @author ruoyi
|
||||
*/
|
||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||
@MapperScan("com.ruoyi.system.mapper_yada")
|
||||
public class RuoYiApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 我们一起学喵叫 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ 喵 \\ \\ / / \n" +
|
||||
" | ( ' ) | 喵 \\ _. / ' \n" +
|
||||
" |(_ o _) / 喵 _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
System.out.println();
|
||||
System.out.println(" --->>>启动成功!<<<---");
|
||||
// System.out.println("(♥◠‿◠)ノ゙ ლ(´ڡ`ლ)゙ \n" +
|
||||
// " .-------. ____ __ \n" +
|
||||
// " | _ _ \\ \\ \\ / / \n" +
|
||||
// " | ( ' ) | \\ _. / ' \n" +
|
||||
// " |(_ o _) / _( )_ .' \n" +
|
||||
// " | (_,_).' __ ___(_ o _)' \n" +
|
||||
// " | |\\ \\ | || |(_,_)' \n" +
|
||||
// " | | \\ `' /| `-' / \n" +
|
||||
// " | | \\ / \\ / \n" +
|
||||
// " ''-' `'-' `-..-' ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.web.controller.RemoteSensing;
|
||||
|
||||
/**
|
||||
* 亚大综合监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 9:08
|
||||
*/
|
||||
public class AdahTestingController {
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.web.controller.RemoteSensing;
|
||||
|
||||
/**
|
||||
* 大气质量监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 10:56
|
||||
*/
|
||||
public class AtmosphereController {
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.web.controller.RemoteSensing;
|
||||
|
||||
/**
|
||||
* ENSO影响监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 9:12
|
||||
*/
|
||||
public class ENSOController {
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.web.controller.RemoteSensing;
|
||||
|
||||
/**
|
||||
* 森林监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 9:13
|
||||
*/
|
||||
public class ForestController {
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package com.ruoyi.web.controller.RemoteSensing;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
*全球生态环境监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 9:05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitor/clobal")
|
||||
public class GlobalEcologyController {
|
||||
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.web.controller.RemoteSensing;
|
||||
|
||||
/**
|
||||
* 专题报告
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:10
|
||||
*/
|
||||
public class SpecialReportController {
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.web.controller.RemoteSensing;
|
||||
|
||||
/**
|
||||
* 城市监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 10:55
|
||||
*/
|
||||
public class UrbanController {
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
package com.ruoyi.web.controller.common;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.FastByteArrayOutputStream;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.google.code.kaptcha.Producer;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.sign.Base64;
|
||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
|
||||
/**
|
||||
* 验证码操作处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
public class CaptchaController
|
||||
{
|
||||
@Resource(name = "captchaProducer")
|
||||
private Producer captchaProducer;
|
||||
|
||||
@Resource(name = "captchaProducerMath")
|
||||
private Producer captchaProducerMath;
|
||||
|
||||
@Resource
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Resource
|
||||
private ISysConfigService configService;
|
||||
/**
|
||||
* 生成验证码
|
||||
*/
|
||||
@GetMapping("/captchaImage")
|
||||
public AjaxResult getCode(HttpServletResponse response) throws IOException
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
boolean captchaOnOff = configService.selectCaptchaOnOff();
|
||||
ajax.put("captchaOnOff", captchaOnOff);
|
||||
if (!captchaOnOff)
|
||||
{
|
||||
return ajax;
|
||||
}
|
||||
|
||||
// 保存验证码信息
|
||||
String uuid = IdUtils.simpleUUID();
|
||||
String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
|
||||
|
||||
String capStr = null, code = null;
|
||||
BufferedImage image = null;
|
||||
|
||||
// 生成验证码
|
||||
String captchaType = RuoYiConfig.getCaptchaType();
|
||||
if ("math".equals(captchaType))
|
||||
{
|
||||
String capText = captchaProducerMath.createText();
|
||||
capStr = capText.substring(0, capText.lastIndexOf("@"));
|
||||
code = capText.substring(capText.lastIndexOf("@") + 1);
|
||||
image = captchaProducerMath.createImage(capStr);
|
||||
}
|
||||
else if ("char".equals(captchaType))
|
||||
{
|
||||
capStr = code = captchaProducer.createText();
|
||||
image = captchaProducer.createImage(capStr);
|
||||
}
|
||||
|
||||
redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||
// 转换流信息写出
|
||||
FastByteArrayOutputStream os = new FastByteArrayOutputStream();
|
||||
try
|
||||
{
|
||||
ImageIO.write(image, "jpg", os);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
|
||||
ajax.put("uuid", uuid);
|
||||
ajax.put("img", Base64.encode(os.toByteArray()));
|
||||
return ajax;
|
||||
}
|
||||
}
|
@ -12,9 +12,11 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.framework.web.service.SysLoginService;
|
||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
||||
import com.ruoyi.framework.web.service.TokenService;
|
||||
import com.ruoyi.system.service.ISysMenuService;
|
||||
|
||||
/**
|
||||
@ -34,6 +36,9 @@ public class SysLoginController
|
||||
@Autowired
|
||||
private SysPermissionService permissionService;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
/**
|
||||
* 登录方法
|
||||
*
|
||||
@ -45,8 +50,7 @@ public class SysLoginController
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
// 生成令牌
|
||||
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
|
||||
loginBody.getUuid());
|
||||
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode());
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
return ajax;
|
||||
}
|
||||
@ -59,7 +63,8 @@ public class SysLoginController
|
||||
@GetMapping("getInfo")
|
||||
public AjaxResult getInfo()
|
||||
{
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
||||
SysUser user = loginUser.getUser();
|
||||
// 角色集合
|
||||
Set<String> roles = permissionService.getRolePermission(user);
|
||||
// 权限集合
|
||||
@ -79,8 +84,10 @@ public class SysLoginController
|
||||
@GetMapping("getRouters")
|
||||
public AjaxResult getRouters()
|
||||
{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
||||
// 用户信息
|
||||
SysUser user = loginUser.getUser();
|
||||
List<SysMenu> menus = menuService.selectMenuTreeByUserId(user.getUserId());
|
||||
return AjaxResult.success(menuService.buildMenus(menus));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,172 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.system.domain_yada.*;
|
||||
import com.ruoyi.system.service_yada.IAorestCoverageService;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.ThematicMapService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.xml.crypto.Data;
|
||||
import java.io.InputStream;
|
||||
import java.security.Guard;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 森林覆盖率
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/Aorest", produces = "application/json;charset=UTF-8")
|
||||
@Api(tags = "森林覆盖率")
|
||||
public class AorestCoverageController {
|
||||
@Resource
|
||||
private IAorestCoverageService service;
|
||||
|
||||
@Resource
|
||||
private ThematicMapService thematicMapService;
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* 需要查询的字段参数
|
||||
* @return 参数类
|
||||
*/
|
||||
@RequestMapping(value = "/selectAorestCoverage",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult selectAorestCoverage()
|
||||
{
|
||||
List<AorestCoverageVO> eastVOSList= service.selectAorestCoverage();
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/DelAorestCoverage",method = {RequestMethod.DELETE})
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
public AjaxResult DelAorestCoverage(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = service.DelAorestCoverage(ID);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/IntoAorestCoverage",method = {RequestMethod.POST})
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
public AjaxResult IntoAorestCoverage(@RequestBody AorestCoverageVO eastVOS)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = service.IntoAorestCoverage(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
catch (Exception E){
|
||||
E.getMessage();
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/IntoUpLoad",method = {RequestMethod.POST})
|
||||
@ApiOperation(value = "上传文件",httpMethod = "POST")
|
||||
public AjaxResult IntoUpload(@RequestBody MultipartFile file)
|
||||
{
|
||||
UploadFile upload=new UploadFile();
|
||||
|
||||
ThematicMapDomain domain=new ThematicMapDomain();
|
||||
|
||||
UploadFile value= null;
|
||||
try {
|
||||
value = uploadFile(file,upload);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
int NUM = service.IntoUpload(value);
|
||||
domain.setPictureCode(value.getFileId());
|
||||
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 文件查询
|
||||
* @param response 头
|
||||
* @param request 客户端请求
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/selectUpload",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "文件查询",httpMethod = "GET")
|
||||
public AjaxResult selectUpload(HttpServletResponse response, HttpServletRequest request,@RequestBody UploadFile upload)
|
||||
{
|
||||
List<UploadFile> eastVOSList= service.selectUpload(upload.getFileId(),upload.getFileName());
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public UploadFile uploadFile(MultipartFile file,UploadFile upload) throws Exception
|
||||
{
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
upload.setFileId(String.valueOf(System.currentTimeMillis()));
|
||||
upload.setFileName(file.getOriginalFilename());
|
||||
upload.setFilePath(fileName);
|
||||
upload.setFileSize(String.valueOf(file.getSize()));
|
||||
upload.setCreateTime(LocalDateTime.now());
|
||||
return upload;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/Dictionary")
|
||||
@ApiOperation(value = "字典查询",httpMethod = "POST")
|
||||
public AjaxResult Dictionary(@RequestBody Dictionary dic)
|
||||
{
|
||||
List<Dictionary> diclist=service.selectDic(dic.getCodingType(),dic.getCodingType1(), dic.getCodingType2());
|
||||
return AjaxResult.success(diclist);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,9 +1,11 @@
|
||||
package com.ruoyi.web.controller.RemoteSensing;
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.service.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service.IForestService;
|
||||
import com.ruoyi.system.vo.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@ -14,39 +16,40 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 澳大利亚中东部地区
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 9:08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/orderMng", produces = "application/json;charset=UTF-8")
|
||||
@RequestMapping(value = "/business-service/api/Australia", produces = "application/json;charset=UTF-8")
|
||||
@Api(tags = "澳大利亚中东部地区")
|
||||
public class AustraliaMiddleEastController
|
||||
{
|
||||
// @Autowired
|
||||
@Resource
|
||||
private IAustraliaMiddleEastService australiaMiddleEastService;
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @return 实体类
|
||||
*/
|
||||
@RequestMapping(value = "/SelectAustralia",method = {RequestMethod.POST})
|
||||
public AjaxResult SelectAustralia(HttpServletResponse response, HttpServletRequest request)
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
@RequestMapping(value = "/SelectAustralia",method = {RequestMethod.GET})
|
||||
public AjaxResult SelectAustralia(@RequestBody AustraliaMiddleEastVO eastVO )
|
||||
{
|
||||
List<AustraliaMiddleEastVO> eastVOSList= australiaMiddleEastService.selectAustralia();
|
||||
List<AustraliaMiddleEastVO> eastVOSList= australiaMiddleEastService.selectAustralia(eastVO.getYearMonth(),eastVO.getMonth());
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID
|
||||
* @return
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/DelAustralia",method = {RequestMethod.POST})
|
||||
@RequestMapping(value = "/DelAustralia",method = {RequestMethod.DELETE})
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
public AjaxResult DelAustralia(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = australiaMiddleEastService.DelAustralia(ID);
|
||||
@ -60,12 +63,14 @@ public class AustraliaMiddleEastController
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS
|
||||
* @return
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/IntoAustralia",method = {RequestMethod.POST})
|
||||
public AjaxResult IntoAustralia(AustraliaMiddleEastVO eastVOS)
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
public AjaxResult IntoAustralia(@RequestBody AustraliaMiddleEastVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = australiaMiddleEastService.IntoAustralia(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
@ -0,0 +1,85 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.GlobalTypeVO;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.IGlobalTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*全球各类型占比
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitor/clobal")
|
||||
@Api(tags = "全球各类型占比")
|
||||
public class GlobalTypeController {
|
||||
@Resource
|
||||
private IGlobalTypeService typeService;
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @param response 响应头
|
||||
* @param request 客户端请求
|
||||
* @return 参数类
|
||||
*/
|
||||
@RequestMapping(value = "/selectGlobalType",method = {RequestMethod.POST})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "POST")
|
||||
public AjaxResult selectGlobalType(HttpServletResponse response, HttpServletRequest request,@RequestBody GlobalTypeVO TypeVO)
|
||||
{
|
||||
List<GlobalTypeVO> eastVOSList= typeService.selectGlobalType(TypeVO.getTypeName(),TypeVO.getParticularYear());
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/DelGlobalType",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
public AjaxResult DelGlobalType(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = typeService.DelGlobalType(ID);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoGlobalType",method = {RequestMethod.POST})
|
||||
public AjaxResult IntoGlobalType(@RequestBody GlobalTypeVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = typeService.IntoGlobalType(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.OceanTemperatureVO;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.IOceanTemperatureService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 海洋表面温度监测
|
||||
*/
|
||||
@Api(tags = "海洋表面温度监测")
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/Ocean", produces = "application/json;charset=UTF-8")
|
||||
public class OceanTemperatureController {
|
||||
@Resource
|
||||
private IOceanTemperatureService temperatureService;
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @return 参数类
|
||||
*/
|
||||
@RequestMapping(value = "/selectOcean",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult selectOcean(@RequestBody OceanTemperatureVO temperatureVO)
|
||||
{
|
||||
List<OceanTemperatureVO> eastVOSList= temperatureService.selectOcean(temperatureVO.getStartDate());
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/DelOcean",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
|
||||
public AjaxResult DelOcean(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = temperatureService.DelOcean(ID);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoAustralia",method = {RequestMethod.POST})
|
||||
public AjaxResult IntoOcean(@RequestBody OceanTemperatureVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = temperatureService.IntoOcean(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.service_yada.IRegionVGIService;
|
||||
import com.ruoyi.system.domain_yada.RegionVGIVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 各区域VGI
|
||||
*/
|
||||
@Api(tags = "各区域VGI")
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/orderMng", produces = "application/json;charset=UTF-8")
|
||||
public class RegionVGIController
|
||||
{
|
||||
@Resource
|
||||
private IRegionVGIService regionVGIService;
|
||||
/**
|
||||
* 查询方法
|
||||
* @return 参数类
|
||||
*/
|
||||
@RequestMapping(value = "/SelectRegion",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult SelectRegion()
|
||||
{
|
||||
List<RegionVGIVO> vgivost= regionVGIService.selectRegion();
|
||||
return AjaxResult.success(vgivost);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/DelRegion",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
public AjaxResult DelRegion(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = regionVGIService.DelRegion(ID);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param vgivo 新增实体类
|
||||
* @return 状态码
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoRegion",method = {RequestMethod.POST})
|
||||
public AjaxResult IntoRegion(@RequestBody RegionVGIVO vgivo)
|
||||
{
|
||||
vgivo.setCreatedTime(LocalDateTime.now());
|
||||
int NUM = regionVGIService.IntoRegion(vgivo);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.RegionVGIVO;
|
||||
import com.ruoyi.system.domain_yada.RegionalSystemVO;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.IRegionalSystemService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 区域生态系统
|
||||
*/
|
||||
@Api(tags = "区域生态系统")
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/Regional", produces = "application/json;charset=UTF-8")
|
||||
public class RegionalSystemController {
|
||||
@Resource
|
||||
private IRegionalSystemService systemService;
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @return 参数类
|
||||
*/
|
||||
@RequestMapping(value = "/selectRegional",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult selectRegional(@RequestParam("region") String region)
|
||||
{
|
||||
List<RegionalSystemVO> eastVOSList= systemService.selectRegional(region);
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/DelRegional",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
public AjaxResult DelRegional(@RequestParam("ID") String ID)
|
||||
{
|
||||
int NUM = systemService.DelRegional(ID);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoRegional",method = {RequestMethod.POST})
|
||||
public AjaxResult IntoRegional(@RequestBody RegionalSystemVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = systemService.IntoRegional(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
@ -0,0 +1,330 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.file.WeatherUtils;
|
||||
import com.ruoyi.system.domain_yada.*;
|
||||
import com.ruoyi.system.service_yada.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import jdk.jfr.Frequency;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import springfox.documentation.spring.web.json.Json;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "/Special")
|
||||
@Api(tags = "模板导入")
|
||||
public class SpecialController {
|
||||
|
||||
@Resource
|
||||
private IRegionVGIService regionVGIService;
|
||||
|
||||
@Resource
|
||||
private IAustraliaMiddleEastService australiaMiddleEastService;
|
||||
|
||||
@Resource
|
||||
private IAorestCoverageService service;
|
||||
|
||||
@Resource
|
||||
private IVegetationCoverageService coverageService;
|
||||
|
||||
@Resource
|
||||
private IRegionalSystemService systemService;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
@RequestMapping(value = "/helpSaveExcel")
|
||||
private AjaxResult helpSaveExcel(@RequestBody MultipartFile file) {
|
||||
List<RegionVGIVO> value = saveExcel(file);
|
||||
|
||||
return IntoRegion(value);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/helpWeatherClass",method = {RequestMethod.GET})
|
||||
public AjaxResult helpWeatherClass(String city,String type)
|
||||
{
|
||||
String url="https://restapi.amap.com/v3/weather/weatherInfo";
|
||||
Map<String,String> map=new HashMap<>();
|
||||
map.put("key","37087f0a3007dc67d37859553cd02d33");
|
||||
map.put("city",city);
|
||||
if (type!=null){ map.put("extensions",type);}
|
||||
map.put("output","json");
|
||||
String value= WeatherUtils.httpRequest(url,map);
|
||||
WeatherUtilsVO vo = JSON.parseObject(value,WeatherUtilsVO.class);
|
||||
// String value2=vo.getForecasts().substring(1,vo.getForecasts().length()-1);
|
||||
// System.out.println(value2);
|
||||
// vo.setForecast(JSON.parseObject(value2,ForecastVo.class));
|
||||
// JSONObject userJson=JSONObject.parseObject(value);
|
||||
// WeatherUtilsVO utilsValue= JSON.toJavaObject(userJson,WeatherUtilsVO.class);
|
||||
|
||||
return AjaxResult.success(vo);
|
||||
} /**
|
||||
* 森林覆盖率模板导入
|
||||
*/
|
||||
@RequestMapping(value = "/helpExcelAorest")
|
||||
private AjaxResult helpExcelAorest(@RequestBody MultipartFile file) {
|
||||
List<AorestCoverageVO> value = saveExcelAorest(file);
|
||||
|
||||
return IntoAorestCoverage(value);
|
||||
}
|
||||
|
||||
/**
|
||||
*平均植被覆盖度和净初级生产力
|
||||
*/
|
||||
@RequestMapping(value = "/helpExcelnpp")
|
||||
private AjaxResult helpExcelnpp(@RequestBody MultipartFile file) {
|
||||
List<VegetationCoverageVO> value = saveExcelnpp(file);
|
||||
|
||||
return IntoVegetation(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 澳大利亚中部地区模板导入
|
||||
*/
|
||||
@RequestMapping(value = "/helpExcelAus")
|
||||
private AjaxResult helpExcelAus(@RequestBody MultipartFile file) {
|
||||
List<AustraliaMiddleEastVO> value = saveExcelAus(file);
|
||||
|
||||
return IntoAustralia(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 区域生态系统类型转移
|
||||
*/
|
||||
@RequestMapping(value = "/helpExcelRegion")
|
||||
private AjaxResult helpExcelRegion(@RequestBody MultipartFile file) {
|
||||
List<RegionalSystemVO> value = saveExcelRegion(file);
|
||||
|
||||
return IntoRegional(value);
|
||||
}
|
||||
|
||||
public AjaxResult IntoRegional(List<RegionalSystemVO> eastVOS)
|
||||
{
|
||||
try {
|
||||
for (int i = 0; i < eastVOS.size(); i++) {
|
||||
eastVOS.get(i).setCreateTime(LocalDateTime.now());
|
||||
systemService.IntoRegional(eastVOS.get(i));
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
catch (Exception E){
|
||||
E.getMessage();
|
||||
return AjaxResult.error(E.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public AjaxResult IntoAustralia(List<AustraliaMiddleEastVO> eastVOS) {
|
||||
|
||||
for (int i = 0; i < eastVOS.size(); i++) {
|
||||
eastVOS.get(i).setCreateTime(LocalDateTime.now());
|
||||
australiaMiddleEastService.IntoAustralia(eastVOS.get(i));
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
public AjaxResult IntoRegion(List<RegionVGIVO> vgivo) {
|
||||
for (int i = 0; i < vgivo.size(); i++) {
|
||||
vgivo.get(i).setCreatedTime(LocalDateTime.now());
|
||||
|
||||
regionVGIService.IntoRegion(vgivo.get(i));
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
|
||||
}
|
||||
|
||||
public AjaxResult IntoAorestCoverage(List<AorestCoverageVO> eastVOS)
|
||||
{
|
||||
try {
|
||||
for (int i = 0; i < eastVOS.size(); i++) {
|
||||
eastVOS.get(i).setCreateTime(LocalDateTime.now());
|
||||
service.IntoAorestCoverage(eastVOS.get(i));
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
catch (Exception E){
|
||||
E.getMessage();
|
||||
return AjaxResult.error(E.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public AjaxResult IntoVegetation(List<VegetationCoverageVO> eastVOS)
|
||||
{
|
||||
try {
|
||||
for (int i = 0; i < eastVOS.size(); i++) {
|
||||
eastVOS.get(i).setCreateTime(LocalDateTime.now());
|
||||
coverageService.IntoVegetation(eastVOS.get(i));
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
catch (Exception E){
|
||||
E.getMessage();
|
||||
return AjaxResult.error(E.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private List<RegionVGIVO> saveExcel(MultipartFile file) {
|
||||
|
||||
try {
|
||||
List<RegionVGIVO> Value = new ArrayList<>();
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Workbook book;
|
||||
Sheet sheet;
|
||||
book = new XSSFWorkbook(inputStream);
|
||||
sheet = book.getSheetAt(0);
|
||||
for (int i = 1; i < sheet.getLastRowNum() + 1; i++) {
|
||||
RegionVGIVO value = new RegionVGIVO();
|
||||
Row row = sheet.getRow(i);
|
||||
value.setCreatedTime(LocalDateTime.now());
|
||||
value.setRegion(row.getCell(0).toString());
|
||||
value.setRegionEn(row.getCell(1).toString());
|
||||
value.setForest(Double.parseDouble(row.getCell(2).toString()));
|
||||
value.setGrassland(Double.parseDouble(row.getCell(3).toString()));
|
||||
value.setParticularYear(row.getCell(4).toString());
|
||||
Value.add(value);
|
||||
}
|
||||
return Value;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private List<AustraliaMiddleEastVO> saveExcelAus(MultipartFile file) {
|
||||
|
||||
try {
|
||||
List<AustraliaMiddleEastVO> Value = new ArrayList<>();
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Workbook book;
|
||||
Sheet sheet;
|
||||
book = new XSSFWorkbook(inputStream);
|
||||
sheet = book.getSheetAt(0);
|
||||
for (int i = 1; i < sheet.getLastRowNum() + 1; i++) {
|
||||
AustraliaMiddleEastVO value = new AustraliaMiddleEastVO();
|
||||
Row row = sheet.getRow(i);
|
||||
value.setYearMonth(row.getCell(0).toString());
|
||||
value.setMonth(row.getCell(1).toString());
|
||||
value.setSstAnomalyIndex(Double.parseDouble(row.getCell(2).toString()));
|
||||
value.setTemperatureAnomolies(Double.parseDouble(row.getCell(3).toString()));
|
||||
value.setPrecipitationAnomolies(Double.parseDouble(row.getCell(4).toString()));
|
||||
value.setVaiAnomolies(Double.parseDouble(row.getCell(5).toString()));
|
||||
Value.add(value);
|
||||
}
|
||||
return Value;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private List<AorestCoverageVO> saveExcelAorest(MultipartFile file) {
|
||||
|
||||
try {
|
||||
List<AorestCoverageVO> Value = new ArrayList<>();
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Workbook book;
|
||||
Sheet sheet;
|
||||
book = new XSSFWorkbook(inputStream);
|
||||
sheet = book.getSheetAt(0);
|
||||
for (int i = 1; i < sheet.getLastRowNum() + 1; i++) {
|
||||
AorestCoverageVO value = new AorestCoverageVO();
|
||||
Row row = sheet.getRow(i);
|
||||
value.setRegion(row.getCell(0).toString());
|
||||
value.setRegionEn(row.getCell(1).toString());
|
||||
value.setProtectedLands(Double.parseDouble(row.getCell(2).toString()));
|
||||
value.setNonProtectedLands(Double.parseDouble(row.getCell(3).toString()));
|
||||
value.setMountain(Double.parseDouble(row.getCell(4).toString()));
|
||||
value.setNonMountain(Double.parseDouble(row.getCell(5).toString()));
|
||||
value.setCreateTime(LocalDateTime.now());
|
||||
Value.add(value);
|
||||
}
|
||||
return Value;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private List<VegetationCoverageVO> saveExcelnpp(MultipartFile file) {
|
||||
|
||||
try {
|
||||
List<VegetationCoverageVO> Value = new ArrayList<>();
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Workbook book;
|
||||
Sheet sheet;
|
||||
book = new XSSFWorkbook(inputStream);
|
||||
sheet = book.getSheetAt(0);
|
||||
for (int i = 1; i < sheet.getLastRowNum() + 1; i++) {
|
||||
VegetationCoverageVO value = new VegetationCoverageVO();
|
||||
Row row = sheet.getRow(i);
|
||||
value.setRegion(row.getCell(0).toString());
|
||||
value.setRegionEn(row.getCell(1).toString());
|
||||
value.setProtectedLands(Double.parseDouble(row.getCell(4).toString()));
|
||||
value.setNonProtectedLands(Double.parseDouble(row.getCell(5).toString()));
|
||||
value.setMountain(Double.parseDouble(row.getCell(2).toString()));
|
||||
value.setNonMountain(Double.parseDouble(row.getCell(3).toString()));
|
||||
value.setCreateTime(LocalDateTime.now());
|
||||
Value.add(value);
|
||||
}
|
||||
return Value;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private List<RegionalSystemVO> saveExcelRegion(MultipartFile file) {
|
||||
|
||||
try {
|
||||
List<RegionalSystemVO> Value = new ArrayList<>();
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Workbook book;
|
||||
Sheet sheet;
|
||||
book = new XSSFWorkbook(inputStream);
|
||||
sheet = book.getSheetAt(0);
|
||||
for (int i = 1; i < sheet.getLastRowNum() + 1; i++) {
|
||||
RegionalSystemVO value = new RegionalSystemVO();
|
||||
Row row = sheet.getRow(i);
|
||||
value.setRegion(row.getCell(0).toString());
|
||||
value.setRegionEn(row.getCell(1).toString());
|
||||
value.setTypeConversion(row.getCell(2).toString());
|
||||
value.setTypeconversionEn(row.getCell(3).toString());
|
||||
value.setProportionOfChangedAreas(Double.parseDouble(row.getCell(4).toString()));
|
||||
value.setCreateTime(LocalDateTime.now());
|
||||
Value.add(value);
|
||||
}
|
||||
return Value;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.system.domain_yada.ThematicMapDomain;
|
||||
import com.ruoyi.system.service_yada.ThematicMapService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 专题图模块
|
||||
* @author taco chen
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "/thematic-map")
|
||||
@Api(tags = "专题图模块")
|
||||
public class ThematicMapController {
|
||||
|
||||
@Resource
|
||||
private ThematicMapService thematicMapService;
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @param response 响应头
|
||||
* @return 参数类
|
||||
*/
|
||||
@ApiOperation("获取所有专题图")
|
||||
@ApiImplicitParams({})
|
||||
@ApiResponses({
|
||||
@ApiResponse(code =200,message = "请求成功"),
|
||||
@ApiResponse(code =401,message = "没有认证"),
|
||||
@ApiResponse(code =403,message = "权限不足"),
|
||||
@ApiResponse(code =404,message = "未找到")
|
||||
})
|
||||
@RequestMapping(value = "/get/all",method = {RequestMethod.POST})
|
||||
public AjaxResult selectAllThematicMap(HttpServletResponse response,@RequestBody ThematicMapDomain thematicMapDomain)
|
||||
{
|
||||
List<ThematicMapDomain> res= thematicMapService.selectAll(thematicMapDomain.getPictureType(),
|
||||
thematicMapDomain.getPictureTypeOne(),thematicMapDomain.getPictureTypeTwo());
|
||||
return AjaxResult.success(res);
|
||||
}
|
||||
/**
|
||||
* 删除方法
|
||||
* @param id id
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/delete",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "long", paramType = "path", dataTypeClass = long.class)
|
||||
public AjaxResult deleteThematicMap(@Param("id") Long id)
|
||||
{
|
||||
int num = thematicMapService.deleteById(id);
|
||||
if (num>0) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param thematicMapDomain 新增实体类
|
||||
* @return 状态码
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/add",method = {RequestMethod.POST})
|
||||
public AjaxResult saveThematicMap(@RequestBody ThematicMapDomain thematicMapDomain)
|
||||
{
|
||||
|
||||
|
||||
thematicMapDomain.setCreatedTime(LocalDateTime.now());
|
||||
int num = thematicMapService.save(thematicMapDomain);
|
||||
if (num>0) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.UrbanVO;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.IUrbanService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 中国城市监测
|
||||
*/
|
||||
@Api(tags = "中国城市监测")
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/Urban", produces = "application/json;charset=UTF-8")
|
||||
public class UrbanController {
|
||||
@Resource
|
||||
private IUrbanService urbanService;
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @param response 响应头
|
||||
* @param request 客户端请求
|
||||
* @return 参数类
|
||||
*/
|
||||
@RequestMapping(value = "/selectUrban",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult selectUrban(HttpServletResponse response, HttpServletRequest request,@RequestBody UrbanVO urbanVO)
|
||||
{
|
||||
List<UrbanVO> eastVOSList= urbanService.selectUrban(urbanVO.getName(),urbanVO.getParticularYear());
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/DelUrban",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
public AjaxResult DelUrban(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = urbanService.DelUrban(ID);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoUrban",method = {RequestMethod.POST})
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "long", paramType = "path", dataTypeClass = long.class)
|
||||
public AjaxResult IntoUrban(@RequestBody UrbanVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = urbanService.IntoUrban(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.VegetationCoverageVO;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.IVegetationCoverageService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 平均植被覆盖度和净初级生产力
|
||||
*/
|
||||
@Api(tags = "平均植被覆盖度和净初级生产力")
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/Vegetation", produces = "application/json;charset=UTF-8")
|
||||
public class VegetationCoverageController {
|
||||
@Resource
|
||||
private IVegetationCoverageService coverageService;
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @return 参数类
|
||||
*/
|
||||
@RequestMapping(value = "/selectVegetation",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult selectVegetation()
|
||||
{
|
||||
List<VegetationCoverageVO> eastVOSList= coverageService.selectVegetation();
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/DelVegetation",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "long", paramType = "path", dataTypeClass = long.class)
|
||||
public AjaxResult DelVegetation(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = coverageService.DelVegetation(ID);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoVegetation",method = {RequestMethod.POST})
|
||||
public AjaxResult IntoVegetation(@RequestBody VegetationCoverageVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = coverageService.IntoVegetation(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
com.ruoyi.framework.web.service.CaptchaRedisService
|
@ -2,13 +2,16 @@
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||
driver-class-name: org.postgresql.Driver
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://192.168.2.9:3306/nuoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: saas
|
||||
password: XKrs123.
|
||||
url: jdbc:postgresql://192.168.2.9:5432/yada?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
username: sjs
|
||||
password: song5325
|
||||
# url: jdbc:mysql://192.168.2.9:3306/nuoyi?AllowPublicKeyRetrieval=True&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
# username: saas
|
||||
# password: XKrs123.
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
@ -30,8 +33,9 @@ spring:
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||
maxEvictableIdleTimeMillis: 900000
|
||||
# 配置检测连接是否有效
|
||||
validationQuery: SELECT 1 FROM DUAL
|
||||
# 配置检测连接是否有效select * from pg_stat_activity
|
||||
# validationQuery: SELECT 1 FROM DUAL
|
||||
validationQuery: SELECT version()
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
@ -54,4 +58,4 @@ spring:
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
multi-statement-allow: true
|
||||
|
@ -3,9 +3,9 @@ ruoyi:
|
||||
# 名称
|
||||
name: RuoYi
|
||||
# 版本
|
||||
version: 3.8.2
|
||||
version: 3.4.0
|
||||
# 版权年份
|
||||
copyrightYear: 2022
|
||||
copyrightYear: 2021
|
||||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
@ -25,13 +25,10 @@ server:
|
||||
tomcat:
|
||||
# tomcat的URI编码
|
||||
uri-encoding: UTF-8
|
||||
# 连接数满后的排队数,默认为100
|
||||
accept-count: 1000
|
||||
threads:
|
||||
# tomcat最大线程数,默认为200
|
||||
max: 800
|
||||
# Tomcat启动初始化的线程数,默认值10
|
||||
min-spare: 100
|
||||
# tomcat最大线程数,默认为200
|
||||
max-threads: 800
|
||||
# Tomcat启动初始化的线程数,默认值25
|
||||
min-spare-threads: 30
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
@ -41,22 +38,19 @@ logging:
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
# config:
|
||||
# activate:
|
||||
# on-profile: druid
|
||||
profiles:
|
||||
active: druid
|
||||
# 资源信息
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
active: druid
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 10MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 20MB
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 10MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 20MB
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
@ -69,9 +63,9 @@ spring:
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 3
|
||||
database: 0
|
||||
# 密码
|
||||
password: yhy_app
|
||||
password: sdust2020
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
@ -87,27 +81,28 @@ spring:
|
||||
|
||||
# token配置
|
||||
token:
|
||||
# 令牌自定义标识
|
||||
header: Authorization
|
||||
# 令牌密钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 30
|
||||
|
||||
# 令牌自定义标识
|
||||
header: Authorization
|
||||
# 令牌密钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 300
|
||||
|
||||
# MyBatis配置
|
||||
mybatis:
|
||||
# 搜索指定包别名
|
||||
typeAliasesPackage: com.ruoyi.**.domain
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
# 搜索指定包别名
|
||||
typeAliasesPackage: com.ruoyi.**.domain
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
pagehelper:
|
||||
helperDialect: mysql
|
||||
reasonable: true
|
||||
supportMethodsArguments: true
|
||||
params: count=countSql
|
||||
params: count=countSql
|
||||
|
||||
# Swagger配置
|
||||
swagger:
|
||||
@ -116,11 +111,26 @@ swagger:
|
||||
# 请求前缀
|
||||
pathMapping: /dev-api
|
||||
|
||||
# 滑块验证码
|
||||
aj:
|
||||
captcha:
|
||||
cache-type: redis
|
||||
# blockPuzzle 滑块 clickWord 文字点选 default默认两者都实例化
|
||||
type: blockPuzzle
|
||||
# 右下角显示字
|
||||
water-mark: ruoyi.vip
|
||||
# 校验滑动拼图允许误差偏移量(默认5像素)
|
||||
slip-offset: 5
|
||||
# aes加密坐标开启或者禁用(true|false)
|
||||
aes-status: true
|
||||
# 滑动干扰项(0/1/2)
|
||||
interference-options: 2
|
||||
|
||||
# 防止XSS攻击
|
||||
xss:
|
||||
# 过滤开关
|
||||
enabled: true
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice
|
||||
excludes: /system/notice/*
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
@ -1,24 +1,6 @@
|
||||
Application Version: ${ruoyi.version}
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// _ooOoo_ //
|
||||
// o6666666o //
|
||||
// 88" . "88 //
|
||||
// (| ^_^ |) //
|
||||
// O\ = /O //
|
||||
// ____/`---'\____ //
|
||||
// .' \\| |// `. //
|
||||
// / \\||| : |||// \ //
|
||||
// / _||||| -:- |||||- \ //
|
||||
// | | \\\ - /// | | //
|
||||
// | \_| ''\---/'' | | //
|
||||
// \ .-\__ `-` ___/-. / //
|
||||
// ___`. .' /--.--\ `. . ___ //
|
||||
// ."" '< `.___\_<|>_/___.' >'"". //
|
||||
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
|
||||
// \ \ `-. \_ __\ /__ _/ .-` / / //
|
||||
// ========`-.____`-.___\_____/___.-`____.-'======== //
|
||||
// `=---=' //
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
||||
// 佛祖保佑 永不宕机 永无BUG //
|
||||
////////////////////////////////////////////////////////////////////
|
||||
_
|
||||
( )
|
||||
| |/') _ __ ___
|
||||
(`\/')| , < ( '__)/',__)
|
||||
> < | |\`\ | | \__, \
|
||||
(_/\_)(_) (_)(_) (____/
|
@ -0,0 +1,66 @@
|
||||
package com.ruoyi.common.utils.file;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/10 9:17
|
||||
*/
|
||||
public class WeatherUtils
|
||||
{
|
||||
|
||||
|
||||
public static String httpRequest(String requestUrl,Map params) {
|
||||
//buffer用于接受返回的字符
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
try {
|
||||
//建立URL,把请求地址给补全,其中urlencode()方法用于把params里的参数给取出来
|
||||
URL url = new URL(requestUrl+"?"+urlencode(params));
|
||||
//打开http连接
|
||||
HttpURLConnection httpUrlConn = (HttpURLConnection) url.openConnection();
|
||||
httpUrlConn.setDoInput(true);
|
||||
httpUrlConn.setRequestMethod("GET");
|
||||
httpUrlConn.connect();
|
||||
|
||||
//获得输入
|
||||
InputStream inputStream = httpUrlConn.getInputStream();
|
||||
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "utf-8");
|
||||
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
|
||||
|
||||
//将bufferReader的值给放到buffer里
|
||||
String str = null;
|
||||
while ((str = bufferedReader.readLine()) != null) {
|
||||
buffer.append(str);
|
||||
}
|
||||
//关闭bufferReader和输入流
|
||||
bufferedReader.close();
|
||||
inputStreamReader.close();
|
||||
inputStream.close();
|
||||
inputStream = null;
|
||||
//断开连接
|
||||
httpUrlConn.disconnect();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//返回字符串
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
public static String urlencode(Map<String,Object>data) {
|
||||
//将map里的参数变成像 showapi_appid=###&showapi_sign=###&的样子
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Map.Entry i : data.entrySet()) {
|
||||
try {
|
||||
sb.append(i.getKey()).append("=").append(URLEncoder.encode(i.getValue()+"","UTF-8")).append("&");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -35,18 +35,26 @@
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 验证码 -->
|
||||
|
||||
<!-- 滑块验证码-->
|
||||
<dependency>
|
||||
<groupId>com.github.penggle</groupId>
|
||||
<artifactId>kaptcha</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<groupId>javax.servlet</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<groupId>com.github.anji-plus</groupId>
|
||||
<artifactId>captcha-spring-boot-starter</artifactId>
|
||||
<version>1.2.7</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 验证码 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.github.penggle</groupId>-->
|
||||
<!-- <artifactId>kaptcha</artifactId>-->
|
||||
<!-- <exclusions>-->
|
||||
<!-- <exclusion>-->
|
||||
<!-- <artifactId>javax.servlet-api</artifactId>-->
|
||||
<!-- <groupId>javax.servlet</groupId>-->
|
||||
<!-- </exclusion>-->
|
||||
<!-- </exclusions>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- 获取系统信息 -->
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
|
@ -1,83 +0,0 @@
|
||||
package com.ruoyi.framework.config;
|
||||
|
||||
import java.util.Properties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import com.google.code.kaptcha.impl.DefaultKaptcha;
|
||||
import com.google.code.kaptcha.util.Config;
|
||||
import static com.google.code.kaptcha.Constants.*;
|
||||
|
||||
/**
|
||||
* 验证码配置
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Configuration
|
||||
public class CaptchaConfig
|
||||
{
|
||||
@Bean(name = "captchaProducer")
|
||||
public DefaultKaptcha getKaptchaBean()
|
||||
{
|
||||
DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
|
||||
Properties properties = new Properties();
|
||||
// 是否有边框 默认为true 我们可以自己设置yes,no
|
||||
properties.setProperty(KAPTCHA_BORDER, "yes");
|
||||
// 验证码文本字符颜色 默认为Color.BLACK
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "black");
|
||||
// 验证码图片宽度 默认为200
|
||||
properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160");
|
||||
// 验证码图片高度 默认为50
|
||||
properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60");
|
||||
// 验证码文本字符大小 默认为40
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "38");
|
||||
// KAPTCHA_SESSION_KEY
|
||||
properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCode");
|
||||
// 验证码文本字符长度 默认为5
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "4");
|
||||
// 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize)
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier");
|
||||
// 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
|
||||
properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy");
|
||||
Config config = new Config(properties);
|
||||
defaultKaptcha.setConfig(config);
|
||||
return defaultKaptcha;
|
||||
}
|
||||
|
||||
@Bean(name = "captchaProducerMath")
|
||||
public DefaultKaptcha getKaptchaBeanMath()
|
||||
{
|
||||
DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
|
||||
Properties properties = new Properties();
|
||||
// 是否有边框 默认为true 我们可以自己设置yes,no
|
||||
properties.setProperty(KAPTCHA_BORDER, "yes");
|
||||
// 边框颜色 默认为Color.BLACK
|
||||
properties.setProperty(KAPTCHA_BORDER_COLOR, "105,179,90");
|
||||
// 验证码文本字符颜色 默认为Color.BLACK
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "blue");
|
||||
// 验证码图片宽度 默认为200
|
||||
properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160");
|
||||
// 验证码图片高度 默认为50
|
||||
properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60");
|
||||
// 验证码文本字符大小 默认为40
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "35");
|
||||
// KAPTCHA_SESSION_KEY
|
||||
properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath");
|
||||
// 验证码文本生成器
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "com.ruoyi.framework.config.KaptchaTextCreator");
|
||||
// 验证码文本字符间距 默认为2
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_SPACE, "3");
|
||||
// 验证码文本字符长度 默认为5
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "6");
|
||||
// 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize)
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier");
|
||||
// 验证码噪点颜色 默认为Color.BLACK
|
||||
properties.setProperty(KAPTCHA_NOISE_COLOR, "white");
|
||||
// 干扰实现类
|
||||
properties.setProperty(KAPTCHA_NOISE_IMPL, "com.google.code.kaptcha.impl.NoNoise");
|
||||
// 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
|
||||
properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy");
|
||||
Config config = new Config(properties);
|
||||
defaultKaptcha.setConfig(config);
|
||||
return defaultKaptcha;
|
||||
}
|
||||
}
|
@ -1,75 +0,0 @@
|
||||
package com.ruoyi.framework.config;
|
||||
|
||||
import java.util.Random;
|
||||
import com.google.code.kaptcha.text.impl.DefaultTextCreator;
|
||||
|
||||
/**
|
||||
* 验证码文本生成器
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class KaptchaTextCreator extends DefaultTextCreator
|
||||
{
|
||||
private static final String[] CNUMBERS = "0,1,2,3,4,5,6,7,8,9,10".split(",");
|
||||
|
||||
@Override
|
||||
public String getText()
|
||||
{
|
||||
Integer result = 0;
|
||||
Random random = new Random();
|
||||
int x = random.nextInt(10);
|
||||
int y = random.nextInt(10);
|
||||
StringBuilder suChinese = new StringBuilder();
|
||||
int randomoperands = (int) Math.round(Math.random() * 2);
|
||||
if (randomoperands == 0)
|
||||
{
|
||||
result = x * y;
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
suChinese.append("*");
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
}
|
||||
else if (randomoperands == 1)
|
||||
{
|
||||
if (!(x == 0) && y % x == 0)
|
||||
{
|
||||
result = y / x;
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
suChinese.append("/");
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = x + y;
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
suChinese.append("+");
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
}
|
||||
}
|
||||
else if (randomoperands == 2)
|
||||
{
|
||||
if (x >= y)
|
||||
{
|
||||
result = x - y;
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
suChinese.append("-");
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = y - x;
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
suChinese.append("-");
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = x + y;
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
suChinese.append("+");
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
}
|
||||
suChinese.append("=?@" + result);
|
||||
return suChinese.toString();
|
||||
}
|
||||
}
|
@ -97,7 +97,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
// 过滤请求
|
||||
.authorizeRequests()
|
||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||
.antMatchers("/login", "/register", "/captchaImage").anonymous()
|
||||
// .antMatchers("/login", "/register", "/captchaImage").anonymous()
|
||||
.antMatchers("/login", "/register", "/captcha/get", "/captcha/check").permitAll()
|
||||
.antMatchers(
|
||||
HttpMethod.GET,
|
||||
"/",
|
||||
@ -110,6 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
.antMatchers("/swagger-ui.html").anonymous()
|
||||
.antMatchers("/swagger-resources/**").anonymous()
|
||||
.antMatchers("/webjars/**").anonymous()
|
||||
.antMatchers("/login", "/captcha/get", "/captcha/check").permitAll()
|
||||
.antMatchers("/*/api-docs").anonymous()
|
||||
.antMatchers("/druid/**").anonymous()
|
||||
// 除上面外的所有请求全部需要鉴权认证
|
||||
|
@ -0,0 +1,53 @@
|
||||
package com.ruoyi.framework.web.service;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import com.anji.captcha.service.CaptchaCacheService;
|
||||
|
||||
/**
|
||||
* 自定义redis验证码缓存实现类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class CaptchaRedisService implements CaptchaCacheService
|
||||
{
|
||||
@Autowired
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
|
||||
@Override
|
||||
public void set(String key, String value, long expiresInSeconds)
|
||||
{
|
||||
stringRedisTemplate.opsForValue().set(key, value, expiresInSeconds, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean exists(String key)
|
||||
{
|
||||
return stringRedisTemplate.hasKey(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String key)
|
||||
{
|
||||
stringRedisTemplate.delete(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String get(String key)
|
||||
{
|
||||
return stringRedisTemplate.opsForValue().get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long increment(String key, long val)
|
||||
{
|
||||
return stringRedisTemplate.opsForValue().increment(key, val);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String type()
|
||||
{
|
||||
return "redis";
|
||||
}
|
||||
}
|
@ -2,32 +2,32 @@ package com.ruoyi.framework.web.service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.anji.captcha.model.common.ResponseModel;
|
||||
import com.anji.captcha.model.vo.CaptchaVO;
|
||||
import com.anji.captcha.service.CaptchaService;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.exception.user.CaptchaException;
|
||||
import com.ruoyi.common.exception.user.CaptchaExpireException;
|
||||
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.ip.IpUtils;
|
||||
import com.ruoyi.framework.manager.AsyncManager;
|
||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
||||
/**
|
||||
* 登录校验方法
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component
|
||||
@ -39,31 +39,31 @@ public class SysLoginService
|
||||
@Resource
|
||||
private AuthenticationManager authenticationManager;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
@Lazy
|
||||
private CaptchaService captchaService;
|
||||
|
||||
/**
|
||||
* 登录验证
|
||||
*
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param password 密码
|
||||
* @param code 验证码
|
||||
* @param uuid 唯一标识
|
||||
* @return 结果
|
||||
*/
|
||||
public String login(String username, String password, String code, String uuid)
|
||||
public String login(String username, String password, String code)
|
||||
{
|
||||
boolean captchaOnOff = configService.selectCaptchaOnOff();
|
||||
// 验证码开关
|
||||
if (captchaOnOff)
|
||||
CaptchaVO captchaVO = new CaptchaVO();
|
||||
captchaVO.setCaptchaVerification(code);
|
||||
ResponseModel response = captchaService.verification(captchaVO);
|
||||
if (!response.isSuccess())
|
||||
{
|
||||
validateCaptcha(username, code, uuid);
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL,
|
||||
MessageUtils.message("user.jcaptcha.error")));
|
||||
throw new CaptchaException();
|
||||
}
|
||||
// 用户验证
|
||||
Authentication authentication = null;
|
||||
@ -88,36 +88,10 @@ public class SysLoginService
|
||||
}
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
|
||||
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
|
||||
recordLoginInfo(loginUser.getUserId());
|
||||
// 生成token
|
||||
return tokenService.createToken(loginUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验验证码
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param code 验证码
|
||||
* @param uuid 唯一标识
|
||||
* @return 结果
|
||||
*/
|
||||
public void validateCaptcha(String username, String code, String uuid)
|
||||
{
|
||||
String verifyKey = Constants.CAPTCHA_CODE_KEY + StringUtils.nvl(uuid, "");
|
||||
String captcha = redisCache.getCacheObject(verifyKey);
|
||||
redisCache.deleteObject(verifyKey);
|
||||
if (captcha == null)
|
||||
{
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
|
||||
throw new CaptchaExpireException();
|
||||
}
|
||||
if (!code.equalsIgnoreCase(captcha))
|
||||
{
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
|
||||
throw new CaptchaException();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录登录信息
|
||||
*
|
||||
@ -131,4 +105,4 @@ public class SysLoginService
|
||||
sysUser.setLoginDate(DateUtils.getNowDate());
|
||||
userService.updateUserProfile(sysUser);
|
||||
}
|
||||
}
|
||||
}
|
@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
current_timestamp
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
dict_type = #{dictType},
|
||||
sort = #{sort},
|
||||
update_by = #{updateBy},
|
||||
update_time = sysdate()
|
||||
update_time = current_timestamp
|
||||
</set>
|
||||
where column_id = #{columnId}
|
||||
</update>
|
||||
|
@ -164,7 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="genPath != null and genPath != ''">#{genPath},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
current_timestamp
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -187,7 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="options != null and options != ''">options = #{options},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = sysdate()
|
||||
update_time = current_timestamp
|
||||
</set>
|
||||
where table_id = #{tableId}
|
||||
</update>
|
||||
|
@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if>
|
||||
sysdate()
|
||||
current_timestamp
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status !=null">status = #{status},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
update_time = current_timestamp
|
||||
</set>
|
||||
where job_id = #{jobId}
|
||||
</update>
|
||||
@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
current_timestamp
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
@ -0,0 +1,89 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
/**
|
||||
* 森林覆盖率
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/20 14:06
|
||||
*/
|
||||
public class AorestCoverageVO extends SysBaseEntity {
|
||||
|
||||
private String id;
|
||||
|
||||
private String particularYear;
|
||||
|
||||
private String region;
|
||||
|
||||
private String regionEn;
|
||||
|
||||
private Double protectedLands;
|
||||
|
||||
private Double nonProtectedLands;
|
||||
|
||||
private Double mountain;
|
||||
|
||||
private Double nonMountain;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getParticularYear() {
|
||||
return particularYear;
|
||||
}
|
||||
|
||||
public void setParticularYear(String particularYear) {
|
||||
this.particularYear = particularYear;
|
||||
}
|
||||
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
public String getRegionEn() {
|
||||
return regionEn;
|
||||
}
|
||||
|
||||
public void setRegionEn(String regionEn) {
|
||||
this.regionEn = regionEn;
|
||||
}
|
||||
|
||||
public Double getProtectedLands() {
|
||||
return protectedLands;
|
||||
}
|
||||
|
||||
public void setProtectedLands(Double protectedLands) {
|
||||
this.protectedLands = protectedLands;
|
||||
}
|
||||
|
||||
public Double getNonProtectedLands() {
|
||||
return nonProtectedLands;
|
||||
}
|
||||
|
||||
public void setNonProtectedLands(Double nonProtectedLands) {
|
||||
this.nonProtectedLands = nonProtectedLands;
|
||||
}
|
||||
|
||||
public Double getMountain() {
|
||||
return mountain;
|
||||
}
|
||||
|
||||
public void setMountain(Double mountain) {
|
||||
this.mountain = mountain;
|
||||
}
|
||||
|
||||
public Double getNonMountain() {
|
||||
return nonMountain;
|
||||
}
|
||||
|
||||
public void setNonMountain(Double nonMountain) {
|
||||
this.nonMountain = nonMountain;
|
||||
}
|
||||
}
|
@ -1,18 +1,18 @@
|
||||
package com.ruoyi.system.vo;
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
import java.lang.ref.PhantomReference;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/19 14:50
|
||||
*/
|
||||
public class AustraliaMiddleEastVO
|
||||
public class AustraliaMiddleEastVO extends SysBaseEntity
|
||||
{
|
||||
private String id;
|
||||
|
||||
private LocalDate yearMonth;
|
||||
private String yearMonth;
|
||||
|
||||
private String month;
|
||||
|
||||
private Double sstAnomalyIndex;
|
||||
|
||||
@ -22,16 +22,19 @@ public class AustraliaMiddleEastVO
|
||||
|
||||
private Double vaiAnomolies;
|
||||
|
||||
private String createdBy;
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
private String createdTime;
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public LocalDate getYearMonth() {
|
||||
public String getYearMonth() {
|
||||
return yearMonth;
|
||||
}
|
||||
|
||||
public void setYearMonth(LocalDate yearMonth) {
|
||||
public void setYearMonth(String yearMonth) {
|
||||
this.yearMonth = yearMonth;
|
||||
}
|
||||
|
||||
@ -67,27 +70,11 @@ public class AustraliaMiddleEastVO
|
||||
this.vaiAnomolies = vaiAnomolies;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
public String getMonth() {
|
||||
return month;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public void setCreatedTime(String createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
public void setMonth(String month) {
|
||||
this.month = month;
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/10 10:04
|
||||
*/
|
||||
public class CastsVo
|
||||
{
|
||||
private String date;
|
||||
|
||||
private String week;
|
||||
|
||||
private String dayweather;
|
||||
|
||||
private String nightweather;
|
||||
|
||||
private String daytemp;
|
||||
|
||||
private String nighttemp;
|
||||
|
||||
private String daywind;
|
||||
|
||||
private String nightwind;
|
||||
|
||||
private String daypower;
|
||||
|
||||
private String nightpower;
|
||||
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(String date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public String getWeek() {
|
||||
return week;
|
||||
}
|
||||
|
||||
public void setWeek(String week) {
|
||||
this.week = week;
|
||||
}
|
||||
|
||||
public String getDayweather() {
|
||||
return dayweather;
|
||||
}
|
||||
|
||||
public void setDayweather(String dayweather) {
|
||||
this.dayweather = dayweather;
|
||||
}
|
||||
|
||||
public String getNightweather() {
|
||||
return nightweather;
|
||||
}
|
||||
|
||||
public void setNightweather(String nightweather) {
|
||||
this.nightweather = nightweather;
|
||||
}
|
||||
|
||||
public String getDaytemp() {
|
||||
return daytemp;
|
||||
}
|
||||
|
||||
public void setDaytemp(String daytemp) {
|
||||
this.daytemp = daytemp;
|
||||
}
|
||||
|
||||
public String getNighttemp() {
|
||||
return nighttemp;
|
||||
}
|
||||
|
||||
public void setNighttemp(String nighttemp) {
|
||||
this.nighttemp = nighttemp;
|
||||
}
|
||||
|
||||
public String getDaywind() {
|
||||
return daywind;
|
||||
}
|
||||
|
||||
public void setDaywind(String daywind) {
|
||||
this.daywind = daywind;
|
||||
}
|
||||
|
||||
public String getNightwind() {
|
||||
return nightwind;
|
||||
}
|
||||
|
||||
public void setNightwind(String nightwind) {
|
||||
this.nightwind = nightwind;
|
||||
}
|
||||
|
||||
public String getDaypower() {
|
||||
return daypower;
|
||||
}
|
||||
|
||||
public void setDaypower(String daypower) {
|
||||
this.daypower = daypower;
|
||||
}
|
||||
|
||||
public String getNightpower() {
|
||||
return nightpower;
|
||||
}
|
||||
|
||||
public void setNightpower(String nightpower) {
|
||||
this.nightpower = nightpower;
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/30 8:50
|
||||
*/
|
||||
//字典表
|
||||
public class Dictionary extends SysBaseEntity
|
||||
{
|
||||
private String codingType;
|
||||
|
||||
private String codingType1;
|
||||
|
||||
private String codingType2;
|
||||
|
||||
private String dictionary;
|
||||
|
||||
private String name;
|
||||
|
||||
private String nameEn;
|
||||
|
||||
public String getCodingType1() {
|
||||
return codingType1;
|
||||
}
|
||||
|
||||
public void setCodingType1(String codingType1) {
|
||||
this.codingType1 = codingType1;
|
||||
}
|
||||
|
||||
public String getCodingType2() {
|
||||
return codingType2;
|
||||
}
|
||||
|
||||
public void setCodingType2(String codingType2) {
|
||||
this.codingType2 = codingType2;
|
||||
}
|
||||
|
||||
public String getCodingType() {
|
||||
return codingType;
|
||||
}
|
||||
|
||||
public void setCodingType(String codingType) {
|
||||
this.codingType = codingType;
|
||||
}
|
||||
|
||||
public String getDictionary() {
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public void setDictionary(String dictionary) {
|
||||
this.dictionary = dictionary;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getNameEn() {
|
||||
return nameEn;
|
||||
}
|
||||
|
||||
public void setNameEn(String nameEn) {
|
||||
this.nameEn = nameEn;
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/10 10:02
|
||||
*/
|
||||
public class ForecastVo {
|
||||
|
||||
private String city;
|
||||
|
||||
private String adcode;
|
||||
|
||||
private String province;
|
||||
|
||||
private String reporttime;
|
||||
|
||||
private List<CastsVo> casts;
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getAdcode() {
|
||||
return adcode;
|
||||
}
|
||||
|
||||
public void setAdcode(String adcode) {
|
||||
this.adcode = adcode;
|
||||
}
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getReporttime() {
|
||||
return reporttime;
|
||||
}
|
||||
|
||||
public void setReporttime(String reporttime) {
|
||||
this.reporttime = reporttime;
|
||||
}
|
||||
|
||||
public List<CastsVo> getCasts() {
|
||||
return casts;
|
||||
}
|
||||
|
||||
public void setCasts(List<CastsVo> casts) {
|
||||
this.casts = casts;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
/**
|
||||
* 全球各类型占比
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/20 14:07
|
||||
*/
|
||||
public class GlobalTypeVO extends SysBaseEntity {
|
||||
|
||||
private String id;
|
||||
|
||||
private String typeName;
|
||||
|
||||
private String typeNameEn;
|
||||
|
||||
private Double areaProportion;
|
||||
|
||||
private Double area;
|
||||
|
||||
private int particularYear;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
public String getTypeNameEn() {
|
||||
return typeNameEn;
|
||||
}
|
||||
|
||||
public void setTypeNameEn(String typeNameEn) {
|
||||
this.typeNameEn = typeNameEn;
|
||||
}
|
||||
|
||||
public Double getAreaProportion() {
|
||||
return areaProportion;
|
||||
}
|
||||
|
||||
public void setAreaProportion(Double areaProportion) {
|
||||
this.areaProportion = areaProportion;
|
||||
}
|
||||
|
||||
public Double getArea() {
|
||||
return area;
|
||||
}
|
||||
|
||||
public void setArea(Double area) {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public int getParticularYear() {
|
||||
return particularYear;
|
||||
}
|
||||
|
||||
public void setParticularYear(int particularYear) {
|
||||
this.particularYear = particularYear;
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/10 9:57
|
||||
*/
|
||||
public class LivesVo
|
||||
{
|
||||
/**
|
||||
* 省份名
|
||||
*/
|
||||
private String province;
|
||||
/**
|
||||
* 城市名
|
||||
*/
|
||||
private String city;
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
private String adcode;
|
||||
/**
|
||||
*天气现象
|
||||
*/
|
||||
private String weather;
|
||||
|
||||
private String temperature;
|
||||
|
||||
private String winddirection;
|
||||
|
||||
private String windpower;
|
||||
|
||||
private String humidity;
|
||||
|
||||
private LocalDateTime reporttime;
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getAdcode() {
|
||||
return adcode;
|
||||
}
|
||||
|
||||
public void setAdcode(String adcode) {
|
||||
this.adcode = adcode;
|
||||
}
|
||||
|
||||
public String getWeather() {
|
||||
return weather;
|
||||
}
|
||||
|
||||
public void setWeather(String weather) {
|
||||
this.weather = weather;
|
||||
}
|
||||
|
||||
public String getTemperature() {
|
||||
return temperature;
|
||||
}
|
||||
|
||||
public void setTemperature(String temperature) {
|
||||
this.temperature = temperature;
|
||||
}
|
||||
|
||||
public String getWinddirection() {
|
||||
return winddirection;
|
||||
}
|
||||
|
||||
public void setWinddirection(String winddirection) {
|
||||
this.winddirection = winddirection;
|
||||
}
|
||||
|
||||
public String getWindpower() {
|
||||
return windpower;
|
||||
}
|
||||
|
||||
public void setWindpower(String windpower) {
|
||||
this.windpower = windpower;
|
||||
}
|
||||
|
||||
public String getHumidity() {
|
||||
return humidity;
|
||||
}
|
||||
|
||||
public void setHumidity(String humidity) {
|
||||
this.humidity = humidity;
|
||||
}
|
||||
|
||||
public LocalDateTime getReporttime() {
|
||||
return reporttime;
|
||||
}
|
||||
|
||||
public void setReporttime(LocalDateTime reporttime) {
|
||||
this.reporttime = reporttime;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**+
|
||||
* 海面温度监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/20 14:08
|
||||
*/
|
||||
public class OceanTemperatureVO extends SysBaseEntity
|
||||
{
|
||||
|
||||
private String id;
|
||||
|
||||
private Integer ninoPhenomenon;
|
||||
|
||||
private Integer laNina;
|
||||
|
||||
private LocalDate startDate;
|
||||
|
||||
private LocalDate endDate;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getNinoPhenomenon() {
|
||||
return ninoPhenomenon;
|
||||
}
|
||||
|
||||
public void setNinoPhenomenon(Integer ninoPhenomenon) {
|
||||
this.ninoPhenomenon = ninoPhenomenon;
|
||||
}
|
||||
|
||||
public Integer getLaNina() {
|
||||
return laNina;
|
||||
}
|
||||
|
||||
public void setLaNina(Integer laNina) {
|
||||
this.laNina = laNina;
|
||||
}
|
||||
|
||||
public LocalDate getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(LocalDate startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public LocalDate getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(LocalDate endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
package com.ruoyi.system.vo;
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
@ -22,11 +23,11 @@ public class RegionVGIVO implements Serializable {
|
||||
|
||||
private Double grassland;
|
||||
|
||||
private Integer particularYear;
|
||||
private String particularYear;
|
||||
|
||||
private String createdBy;
|
||||
|
||||
private LocalDate createdTime;
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
@ -84,11 +85,11 @@ public class RegionVGIVO implements Serializable {
|
||||
this.grassland = grassland;
|
||||
}
|
||||
|
||||
public Integer getParticularYear() {
|
||||
public String getParticularYear() {
|
||||
return particularYear;
|
||||
}
|
||||
|
||||
public void setParticularYear(Integer particularYear) {
|
||||
public void setParticularYear(String particularYear) {
|
||||
this.particularYear = particularYear;
|
||||
}
|
||||
|
||||
@ -100,11 +101,11 @@ public class RegionVGIVO implements Serializable {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public LocalDate getCreatedTime() {
|
||||
public LocalDateTime getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public void setCreatedTime(LocalDate createdTime) {
|
||||
public void setCreatedTime(LocalDateTime createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
@ -0,0 +1,80 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
/**
|
||||
* 区域生态系统
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/20 14:09
|
||||
*/
|
||||
|
||||
public class RegionalSystemVO extends SysBaseEntity{
|
||||
|
||||
private String id;
|
||||
|
||||
private String region;
|
||||
|
||||
private String regionEn;
|
||||
|
||||
private String typeConversion;
|
||||
|
||||
private String typeconversionEn;
|
||||
|
||||
private Double proportionOfChangedAreas;
|
||||
|
||||
private String particularYear;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
public String getRegionEn() {
|
||||
return regionEn;
|
||||
}
|
||||
|
||||
public void setRegionEn(String regionEn) {
|
||||
this.regionEn = regionEn;
|
||||
}
|
||||
|
||||
public String getTypeConversion() {
|
||||
return typeConversion;
|
||||
}
|
||||
|
||||
public void setTypeConversion(String typeConversion) {
|
||||
this.typeConversion = typeConversion;
|
||||
}
|
||||
|
||||
public String getTypeconversionEn() {
|
||||
return typeconversionEn;
|
||||
}
|
||||
|
||||
public void setTypeconversionEn(String typeconversionEn) {
|
||||
this.typeconversionEn = typeconversionEn;
|
||||
}
|
||||
|
||||
public Double getProportionOfChangedAreas() {
|
||||
return proportionOfChangedAreas;
|
||||
}
|
||||
|
||||
public void setProportionOfChangedAreas(Double proportionOfChangedAreas) {
|
||||
this.proportionOfChangedAreas = proportionOfChangedAreas;
|
||||
}
|
||||
|
||||
public String getParticularYear() {
|
||||
return particularYear;
|
||||
}
|
||||
|
||||
public void setParticularYear(String particularYear) {
|
||||
this.particularYear = particularYear;
|
||||
}
|
||||
}
|
@ -1,9 +1,7 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -20,15 +18,13 @@ public class SysBaseEntity implements Serializable
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
@ -46,13 +42,11 @@ public class SysBaseEntity implements Serializable
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
public LocalDateTime getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
public void setCreateTime(LocalDateTime createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@ -66,13 +60,11 @@ public class SysBaseEntity implements Serializable
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
public LocalDateTime getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
public void setUpdateTime(LocalDateTime updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
@ -0,0 +1,158 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 专题图实体类
|
||||
* @Author: taco chen
|
||||
* @Date: 2022/5/20 14:09
|
||||
*/
|
||||
public class ThematicMapDomain extends SysBaseEntity {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String pictureCode;
|
||||
|
||||
private String pictureTypeOne;
|
||||
|
||||
private String pictureTypeTwo;
|
||||
|
||||
private String pictureZh;
|
||||
|
||||
private String pictureEn;
|
||||
|
||||
private String pictureName;
|
||||
|
||||
private String pictureType;
|
||||
|
||||
private LocalDateTime pictureTime;
|
||||
|
||||
private String picturePath;
|
||||
|
||||
private String remarks;
|
||||
|
||||
private String createdBy;
|
||||
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
public String getPictureCode() {
|
||||
return pictureCode;
|
||||
}
|
||||
|
||||
public void setPictureCode(String pictureCode) {
|
||||
this.pictureCode = pictureCode;
|
||||
}
|
||||
|
||||
public String getPictureTypeOne() {
|
||||
return pictureTypeOne;
|
||||
}
|
||||
|
||||
public void setPictureTypeOne(String pictureTypeOne) {
|
||||
this.pictureTypeOne = pictureTypeOne;
|
||||
}
|
||||
|
||||
public String getPictureTypeTwo() {
|
||||
return pictureTypeTwo;
|
||||
}
|
||||
|
||||
public void setPictureTypeTwo(String pictureTypeTwo) {
|
||||
this.pictureTypeTwo = pictureTypeTwo;
|
||||
}
|
||||
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPictureZh() {
|
||||
return pictureZh;
|
||||
}
|
||||
|
||||
public void setPictureZh(String pictureZh) {
|
||||
this.pictureZh = pictureZh;
|
||||
}
|
||||
|
||||
public String getPictureEn() {
|
||||
return pictureEn;
|
||||
}
|
||||
|
||||
public void setPictureEn(String pictureEn) {
|
||||
this.pictureEn = pictureEn;
|
||||
}
|
||||
|
||||
public String getPictureName() {
|
||||
return pictureName;
|
||||
}
|
||||
|
||||
public void setPictureName(String pictureName) {
|
||||
this.pictureName = pictureName;
|
||||
}
|
||||
|
||||
public String getPictureType() {
|
||||
return pictureType;
|
||||
}
|
||||
|
||||
public void setPictureType(String pictureType) {
|
||||
this.pictureType = pictureType;
|
||||
}
|
||||
|
||||
public LocalDateTime getPictureTime() {
|
||||
return pictureTime;
|
||||
}
|
||||
|
||||
public void setPictureTime(LocalDateTime pictureTime) {
|
||||
this.pictureTime = pictureTime;
|
||||
}
|
||||
|
||||
public String getPicturePath() {
|
||||
return picturePath;
|
||||
}
|
||||
|
||||
public void setPicturePath(String picturePath) {
|
||||
this.picturePath = picturePath;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public void setCreatedTime(LocalDateTime createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ThematicMapDomain{" +
|
||||
"id=" + id +
|
||||
", pictureZh='" + pictureZh + '\'' +
|
||||
", pictureEn='" + pictureEn + '\'' +
|
||||
", pictureName='" + pictureName + '\'' +
|
||||
", pictureType='" + pictureType + '\'' +
|
||||
", pictureTime=" + pictureTime +
|
||||
", picturePath='" + picturePath + '\'' +
|
||||
", remarks='" + remarks + '\'' +
|
||||
", createdBy='" + createdBy + '\'' +
|
||||
", createdTime=" + createdTime +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/24 14:24
|
||||
*/
|
||||
public class UploadFile extends SysBaseEntity
|
||||
{
|
||||
private String id;
|
||||
|
||||
private String fileId;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private String filePath;
|
||||
|
||||
private String fileSize;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getFileId() {
|
||||
return fileId;
|
||||
}
|
||||
|
||||
public void setFileId(String fileId) {
|
||||
this.fileId = fileId;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getFilePath() {
|
||||
return filePath;
|
||||
}
|
||||
|
||||
public void setFilePath(String filePath) {
|
||||
this.filePath = filePath;
|
||||
}
|
||||
|
||||
public String getFileSize() {
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public void setFileSize(String fileSize) {
|
||||
this.fileSize = fileSize;
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 城市监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/20 16:55
|
||||
*/
|
||||
public class UrbanVO extends SysBaseEntity{
|
||||
|
||||
private String id;
|
||||
|
||||
private String particularYear;
|
||||
|
||||
private String name;
|
||||
|
||||
private String nameEn;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getParticularYear() {
|
||||
return particularYear;
|
||||
}
|
||||
|
||||
public void setParticularYear(String particularYear) {
|
||||
this.particularYear = particularYear;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getNameEn() {
|
||||
return nameEn;
|
||||
}
|
||||
|
||||
public void setNameEn(String nameEn) {
|
||||
this.nameEn = nameEn;
|
||||
}
|
||||
|
||||
public Double getUrbanArea() {
|
||||
return urbanArea;
|
||||
}
|
||||
|
||||
public void setUrbanArea(Double urbanArea) {
|
||||
this.urbanArea = urbanArea;
|
||||
}
|
||||
|
||||
private Double urbanArea;
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 平均植被覆盖度和净初级生产力
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/20 14:09
|
||||
*/
|
||||
public class VegetationCoverageVO extends SysBaseEntity
|
||||
{
|
||||
private String id;
|
||||
|
||||
private String region;
|
||||
|
||||
private String regionEn;
|
||||
|
||||
private String particularYear;
|
||||
|
||||
private Double mountain;
|
||||
|
||||
private Double nonMountain;
|
||||
|
||||
private Double protectedLands;
|
||||
|
||||
private Double nonProtectedLands;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
public String getRegionEn() {
|
||||
return regionEn;
|
||||
}
|
||||
|
||||
public void setRegionEn(String regionEn) {
|
||||
this.regionEn = regionEn;
|
||||
}
|
||||
|
||||
public String getParticularYear() {
|
||||
return particularYear;
|
||||
}
|
||||
|
||||
public void setParticularYear(String particularYear) {
|
||||
this.particularYear = particularYear;
|
||||
}
|
||||
|
||||
public Double getMountain() {
|
||||
return mountain;
|
||||
}
|
||||
|
||||
public void setMountain(Double mountain) {
|
||||
this.mountain = mountain;
|
||||
}
|
||||
|
||||
public Double getNonMountain() {
|
||||
return nonMountain;
|
||||
}
|
||||
|
||||
public void setNonMountain(Double nonMountain) {
|
||||
this.nonMountain = nonMountain;
|
||||
}
|
||||
|
||||
public Double getProtectedLands() {
|
||||
return protectedLands;
|
||||
}
|
||||
|
||||
public void setProtectedLands(Double protectedLands) {
|
||||
this.protectedLands = protectedLands;
|
||||
}
|
||||
|
||||
public Double getNonProtectedLands() {
|
||||
return nonProtectedLands;
|
||||
}
|
||||
|
||||
public void setNonProtectedLands(Double nonProtectedLands) {
|
||||
this.nonProtectedLands = nonProtectedLands;
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/10 9:53
|
||||
*/
|
||||
public class WeatherUtilsVO {
|
||||
/**
|
||||
* 接口返回状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 返回结果数量
|
||||
*/
|
||||
private String count;
|
||||
|
||||
private String info;
|
||||
|
||||
private String infocode;
|
||||
/**
|
||||
* 实时天气预报
|
||||
*/
|
||||
private List<LivesVo> lives;
|
||||
/**
|
||||
* 预报天气
|
||||
*/
|
||||
private List<ForecastVo> forecasts;
|
||||
|
||||
// /**
|
||||
// * 预报天气
|
||||
// */
|
||||
// private String forecasts;
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setCount(String count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getInfocode() {
|
||||
return infocode;
|
||||
}
|
||||
|
||||
public void setInfocode(String infocode) {
|
||||
this.infocode = infocode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<ForecastVo> getForecasts() {
|
||||
return forecasts;
|
||||
}
|
||||
|
||||
public void setForecasts(List<ForecastVo> forecasts) {
|
||||
this.forecasts = forecasts;
|
||||
}
|
||||
|
||||
public List<LivesVo> getLives() {
|
||||
return lives;
|
||||
}
|
||||
|
||||
public void setLives(List<LivesVo> lives) {
|
||||
this.lives = lives;
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:17
|
||||
*/
|
||||
public interface AdahTestingMapper {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:17
|
||||
*/
|
||||
public interface AtmosphereMapper {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:18
|
||||
*/
|
||||
public interface ENSOMapper {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:18
|
||||
*/
|
||||
public interface ForestMapper {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:18
|
||||
*/
|
||||
public interface GlobalEcologyMapper {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:18
|
||||
*/
|
||||
public interface UrbanMapper {
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.ruoyi.system.mapper_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.AorestCoverageVO;
|
||||
import com.ruoyi.system.domain_yada.Dictionary;
|
||||
import com.ruoyi.system.domain_yada.UploadFile;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:17
|
||||
*/
|
||||
public interface AorestCoverageMapper {
|
||||
|
||||
List<AorestCoverageVO> selectAorestCoverage(/*@Param("region") String region,
|
||||
@Param("particularYear") String particularYear*/);
|
||||
|
||||
Integer DelAorestCoverage(@Param("id") String id);
|
||||
|
||||
Integer IntoAorestCoverage(AorestCoverageVO eastVO);
|
||||
|
||||
Integer IntoUpload(UploadFile file);
|
||||
|
||||
List<UploadFile> selectUpload(@Param("fileId") String fileId,@Param("fileName") String fileName);
|
||||
|
||||
List<Dictionary> selectDic(@Param("codingType") String codingType,@Param("codingType1") String codingType1,
|
||||
@Param("codingType2") String codingType2);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
package com.ruoyi.system.mapper_yada;
|
||||
|
||||
import com.ruoyi.system.vo.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
@ -13,7 +13,8 @@ import java.util.List;
|
||||
*/
|
||||
public interface AustraliaMiddleEastMapper {
|
||||
|
||||
List<AustraliaMiddleEastVO> selectAustralia();
|
||||
List<AustraliaMiddleEastVO> selectAustralia(@Param("yearMonth") String yearMonth,
|
||||
@Param("month") String month);
|
||||
|
||||
Integer DelAustralia(@Param("id") String id);
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.ruoyi.system.mapper_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.GlobalTypeVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:18
|
||||
*/
|
||||
public interface GlobalTypeMapper {
|
||||
|
||||
List<GlobalTypeVO> selectGlobalType(@Param("typeName") String typeName, @Param("particularYear") Integer particularYear);
|
||||
|
||||
Integer DelGlobalType(@Param("id") String id);
|
||||
|
||||
Integer IntoGlobalType(GlobalTypeVO typeVO);
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.ruoyi.system.mapper_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.OceanTemperatureVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:18
|
||||
*/
|
||||
@Repository
|
||||
public interface OceanTemperatureMapper {
|
||||
|
||||
List<OceanTemperatureVO> selectOcean(@Param("startDate") LocalDate startDate);
|
||||
|
||||
Integer DelOcean(@Param("id") String id);
|
||||
|
||||
Integer IntoOcean(OceanTemperatureVO eastVO);
|
||||
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
package com.ruoyi.system.mapper_yada;
|
||||
|
||||
import com.ruoyi.system.vo.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.vo.RegionVGIVO;
|
||||
import com.ruoyi.system.domain_yada.RegionVGIVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@ -12,7 +11,8 @@ import java.util.List;
|
||||
*/
|
||||
public interface RegionVGIMapper {
|
||||
|
||||
List<RegionVGIVO> selectRegion();
|
||||
List<RegionVGIVO> selectRegion(/*@Param("typeName") String typeName,
|
||||
@Param("particularYear") String particularYear*/);
|
||||
|
||||
Integer DelRegion(@Param("id") String id);
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.ruoyi.system.mapper_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.RegionalSystemVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:18
|
||||
*/
|
||||
public interface RegionalSystemMapper {
|
||||
|
||||
List<RegionalSystemVO> selectRegional(@Param("region") String region);
|
||||
|
||||
Integer DelRegional(@Param("id") String id);
|
||||
|
||||
Integer IntoRegional(RegionalSystemVO eastVO);
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.ruoyi.system.mapper_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.ThematicMapDomain;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author taco chen
|
||||
*/
|
||||
public interface ThematicMapMapper {
|
||||
|
||||
/**
|
||||
* 获取所有专题图
|
||||
* @return
|
||||
*/
|
||||
List<ThematicMapDomain> selectAllThematicMap(@Param("pictureType") String pictureType,
|
||||
@Param("pictureTypeOne") String pictureTypeOne,
|
||||
@Param("pictureTypeTwo") String pictureTypeTwo);
|
||||
|
||||
/**
|
||||
* 删除专题图根据编号
|
||||
* @param id 编号
|
||||
* @return
|
||||
*/
|
||||
Integer deleteThematicMap(Long id);
|
||||
|
||||
/**
|
||||
* 保存专题图
|
||||
* @param thematicMapDomain
|
||||
* @return
|
||||
*/
|
||||
Integer saveThematicMap(ThematicMapDomain thematicMapDomain);
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.system.mapper_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.UrbanVO;
|
||||
import com.ruoyi.system.domain_yada.VegetationCoverageVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:18
|
||||
*/
|
||||
public interface UrbanMapper {
|
||||
|
||||
List<UrbanVO> selectUrban(@Param("name") String name,
|
||||
@Param("particularYear") String particularYear);
|
||||
|
||||
Integer DelUrban(@Param("id") String id);
|
||||
|
||||
Integer IntoUrban(UrbanVO eastVO);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.ruoyi.system.mapper_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.VegetationCoverageVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 15:17
|
||||
*/
|
||||
public interface VegetationCoverageMapper {
|
||||
|
||||
List<VegetationCoverageVO> selectVegetation(/*@Param("region") String region,
|
||||
@Param("particularYear") String particularYear*/);
|
||||
|
||||
Integer DelVegetation(@Param("id") String id);
|
||||
|
||||
Integer IntoVegetation(VegetationCoverageVO eastVO);
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
/**
|
||||
* 亚大综合监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:32
|
||||
*/
|
||||
public interface IAdahTestingService {
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
/**
|
||||
* 大气质量监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:34
|
||||
*/
|
||||
public interface IAtmosphereService {
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
/**
|
||||
* ENSO影响监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:35
|
||||
*/
|
||||
public interface IENSOService {
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
/**
|
||||
* 森林监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:38
|
||||
*/
|
||||
public interface IForestService {
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
/**
|
||||
* 全球生态环境监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:37
|
||||
*/
|
||||
public interface IGlobalEcologyService {
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.vo.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.vo.RegionVGIVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:34
|
||||
*/
|
||||
public interface IRegionVGIService {
|
||||
|
||||
public List<RegionVGIVO> selectRegion();
|
||||
|
||||
public Integer DelRegion(@Param("id") String id);
|
||||
|
||||
public Integer IntoRegion(RegionVGIVO eastVO);
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
/**
|
||||
* 城市监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:40
|
||||
*/
|
||||
public interface IUrbanService {
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.system.service.IAdahTestingService;
|
||||
|
||||
/**
|
||||
* 亚大综合监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:43
|
||||
*/
|
||||
public class AdahTestingServiceimpl implements IAdahTestingService {
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.system.service.IAtmosphereService;
|
||||
|
||||
/**
|
||||
* 大气质量监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:45
|
||||
*/
|
||||
public class AtmosphereServiceimpl implements IAtmosphereService {
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.system.service.IENSOService;
|
||||
|
||||
/**
|
||||
* ENSO影响监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:46
|
||||
*/
|
||||
public class ENSOServiceimpl implements IENSOService {
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.system.service.IForestService;
|
||||
|
||||
/**
|
||||
* 森林监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:47
|
||||
*/
|
||||
public class ForestServiceimpl implements IForestService {
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.system.service.IGlobalEcologyService;
|
||||
|
||||
/**
|
||||
* 全球生态环境监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:47
|
||||
*/
|
||||
public class GlobalEcologyServiceimpl implements IGlobalEcologyService {
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.system.service.IUrbanService;
|
||||
|
||||
/**
|
||||
* * 城市监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:49
|
||||
*/
|
||||
public class UrbanServiceimpl implements IUrbanService {
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.ruoyi.system.service_yada;
|
||||
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.system.domain_yada.AorestCoverageVO;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.Dictionary;
|
||||
import com.ruoyi.system.domain_yada.UploadFile;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 森林覆盖率
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:32
|
||||
*/
|
||||
public interface IAorestCoverageService {
|
||||
|
||||
public List<AorestCoverageVO> selectAorestCoverage(/*String region,String particularYear*/);
|
||||
|
||||
public Integer DelAorestCoverage(String id);
|
||||
|
||||
public Integer IntoAorestCoverage(AorestCoverageVO eastVO);
|
||||
|
||||
public Integer IntoUpload(UploadFile file);
|
||||
|
||||
public List<UploadFile> selectUpload(String fileId,String fileName);
|
||||
|
||||
List<Dictionary> selectDic(String codingType,String codingType1,
|
||||
String codingType2);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package com.ruoyi.system.service;
|
||||
package com.ruoyi.system.service_yada;
|
||||
|
||||
import com.ruoyi.system.vo.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@ -12,7 +12,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface IAustraliaMiddleEastService
|
||||
{
|
||||
public List<AustraliaMiddleEastVO> selectAustralia();
|
||||
public List<AustraliaMiddleEastVO> selectAustralia(String yearMonth,String month);
|
||||
|
||||
public Integer DelAustralia(@Param("id") String id);
|
||||
|
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.system.service_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.GlobalTypeVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 全球各类型占比
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:37
|
||||
*/
|
||||
public interface IGlobalTypeService {
|
||||
|
||||
public List<GlobalTypeVO> selectGlobalType(String typeName, Integer particularYear);
|
||||
|
||||
public Integer DelGlobalType(String id);
|
||||
|
||||
public Integer IntoGlobalType(GlobalTypeVO typeVO);
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.ruoyi.system.service_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.OceanTemperatureVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 海面表面温度监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:38
|
||||
*/
|
||||
public interface IOceanTemperatureService {
|
||||
|
||||
public List<OceanTemperatureVO> selectOcean(LocalDate startDate);
|
||||
|
||||
public Integer DelOcean(@Param("id") String id);
|
||||
|
||||
public Integer IntoOcean(OceanTemperatureVO eastVO);
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.ruoyi.system.service_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.RegionVGIVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:34
|
||||
*/
|
||||
public interface IRegionVGIService {
|
||||
|
||||
/**
|
||||
* 查询
|
||||
* @return
|
||||
*/
|
||||
public List<RegionVGIVO> selectRegion(/*String typeName,String particularYear*/);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public Integer DelRegion(@Param("id") String id);
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param eastVO
|
||||
* @return
|
||||
*/
|
||||
public Integer IntoRegion(RegionVGIVO eastVO);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.system.service_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.RegionalSystemVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 区域生态系统
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:35
|
||||
*/
|
||||
public interface IRegionalSystemService {
|
||||
|
||||
public List<RegionalSystemVO> selectRegional(String region);
|
||||
|
||||
public Integer DelRegional(@Param("id") String id);
|
||||
|
||||
public Integer IntoRegional(RegionalSystemVO eastVO);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.ruoyi.system.service;
|
||||
package com.ruoyi.system.service_yada;
|
||||
|
||||
/**
|
||||
* 专题报告
|
@ -0,0 +1,20 @@
|
||||
package com.ruoyi.system.service_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.UrbanVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 城市监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:40
|
||||
*/
|
||||
public interface IUrbanService {
|
||||
|
||||
public List<UrbanVO> selectUrban(String name, String particularYear);
|
||||
|
||||
public Integer DelUrban(@Param("id") String id);
|
||||
|
||||
public Integer IntoUrban(UrbanVO eastVO);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.system.service_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.VegetationCoverageVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 平均植被覆盖度和净初级生产力
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:34
|
||||
*/
|
||||
public interface IVegetationCoverageService {
|
||||
|
||||
public List<VegetationCoverageVO> selectVegetation(/*String region,String particularYear*/);
|
||||
|
||||
public Integer DelVegetation(String id);
|
||||
|
||||
public Integer IntoVegetation(VegetationCoverageVO eastVO);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user