diff --git a/demo/.gitignore b/demo/.gitignore new file mode 100644 index 000000000..549e00a2a --- /dev/null +++ b/demo/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/demo/.mvn/wrapper/maven-wrapper.jar b/demo/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 000000000..c1dd12f17 Binary files /dev/null and b/demo/.mvn/wrapper/maven-wrapper.jar differ diff --git a/demo/.mvn/wrapper/maven-wrapper.properties b/demo/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 000000000..b7cb93e70 --- /dev/null +++ b/demo/.mvn/wrapper/maven-wrapper.properties @@ -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 diff --git a/demo/mvnw b/demo/mvnw new file mode 100644 index 000000000..8a8fb2282 --- /dev/null +++ b/demo/mvnw @@ -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 "$@" diff --git a/demo/mvnw.cmd b/demo/mvnw.cmd new file mode 100644 index 000000000..1d8ab018e --- /dev/null +++ b/demo/mvnw.cmd @@ -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% diff --git a/demo/pom.xml b/demo/pom.xml new file mode 100644 index 000000000..ddb8c5bd9 --- /dev/null +++ b/demo/pom.xml @@ -0,0 +1,41 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.7.0 + + + com.example + demo + 0.0.1-SNAPSHOT + demo + Demo project for Spring Boot + + 11 + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/demo/src/main/java/com/example/demo/DemoApplication.java b/demo/src/main/java/com/example/demo/DemoApplication.java new file mode 100644 index 000000000..64b538a17 --- /dev/null +++ b/demo/src/main/java/com/example/demo/DemoApplication.java @@ -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); + } + +} diff --git a/demo/src/main/resources/application.properties b/demo/src/main/resources/application.properties new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/demo/src/main/resources/application.properties @@ -0,0 +1 @@ + diff --git a/demo/src/test/java/com/example/demo/DemoApplicationTests.java b/demo/src/test/java/com/example/demo/DemoApplicationTests.java new file mode 100644 index 000000000..2778a6a7e --- /dev/null +++ b/demo/src/test/java/com/example/demo/DemoApplicationTests.java @@ -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() { + } + +} diff --git a/pom.xml b/pom.xml index b8d1184dd..fe1ad7c57 100644 --- a/pom.xml +++ b/pom.xml @@ -18,13 +18,13 @@ UTF-8 11 3.1.1 - 1.2.8 + 1.2.11 1.21 3.0.0 2.3.2 2.2.2 - 1.4.1 - 1.2.80 + 1.4.2 + 1.2.83 6.1.6 2.11.0 1.4 @@ -42,7 +42,7 @@ org.springframework.boot spring-boot-dependencies - 2.5.13 + 2.5.14 pom import diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 403482559..5f4c2efef 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -17,7 +17,27 @@ - + + + org.apache.poi + + poi + + 4.0.1 + + + + + + org.apache.poi + + poi-ooxml + + 4.0.1 + + + + org.springframework.boot spring-boot-devtools @@ -34,7 +54,19 @@ io.swagger swagger-models - 1.6.2 + 1.6.6 + + + + com.github.xiaoymin + knife4j-spring-boot-starter + 3.0.3 + + + + org.postgresql + postgresql + 42.2.20 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java index 9639bc9c3..5e9898eb3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java @@ -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" + +// " ''-' `'-' `-..-' "); } + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/AdahTestingController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/AdahTestingController.java deleted file mode 100644 index dd2902ba6..000000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/AdahTestingController.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.web.controller.RemoteSensing; - -/** - * 亚大综合监测 - * @Author: JinSheng Song - * @Date: 2022/5/11 9:08 - */ -public class AdahTestingController { -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/AtmosphereController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/AtmosphereController.java deleted file mode 100644 index dd864858e..000000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/AtmosphereController.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.web.controller.RemoteSensing; - -/** - * 大气质量监测 - * @Author: JinSheng Song - * @Date: 2022/5/11 10:56 - */ -public class AtmosphereController { -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/ENSOController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/ENSOController.java deleted file mode 100644 index d79abbb3b..000000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/ENSOController.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.web.controller.RemoteSensing; - -/** - * ENSO影响监测 - * @Author: JinSheng Song - * @Date: 2022/5/11 9:12 - */ -public class ENSOController { -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/ForestController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/ForestController.java deleted file mode 100644 index 43ba9c619..000000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/ForestController.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.web.controller.RemoteSensing; - -/** - * 森林监测 - * @Author: JinSheng Song - * @Date: 2022/5/11 9:13 - */ -public class ForestController { -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/GlobalEcologyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/GlobalEcologyController.java deleted file mode 100644 index 73895658f..000000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/GlobalEcologyController.java +++ /dev/null @@ -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 { - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/RegionVGIController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/RegionVGIController.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/SpecialReportController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/SpecialReportController.java deleted file mode 100644 index b019a94d9..000000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/SpecialReportController.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.web.controller.RemoteSensing; - -/** - * 专题报告 - * @Author: JinSheng Song - * @Date: 2022/5/11 11:10 - */ -public class SpecialReportController { -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/UrbanController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/UrbanController.java deleted file mode 100644 index 27fbf3353..000000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/UrbanController.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.web.controller.RemoteSensing; - -/** - * 城市监测 - * @Author: JinSheng Song - * @Date: 2022/5/11 10:55 - */ -public class UrbanController { -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java deleted file mode 100644 index 39b32ef3e..000000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java +++ /dev/null @@ -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; - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java index d959a17e0..600265f57 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java @@ -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 roles = permissionService.getRolePermission(user); // 权限集合 @@ -79,8 +84,10 @@ public class SysLoginController @GetMapping("getRouters") public AjaxResult getRouters() { - Long userId = SecurityUtils.getUserId(); - List menus = menuService.selectMenuTreeByUserId(userId); + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + // 用户信息 + SysUser user = loginUser.getUser(); + List menus = menuService.selectMenuTreeByUserId(user.getUserId()); return AjaxResult.success(menuService.buildMenus(menus)); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AorestCoverageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AorestCoverageController.java new file mode 100644 index 000000000..247d55980 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AorestCoverageController.java @@ -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 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 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 diclist=service.selectDic(dic.getCodingType(),dic.getCodingType1(), dic.getCodingType2()); + return AjaxResult.success(diclist); + } + + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/AustraliaMiddleEastController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AustraliaMiddleEastController.java similarity index 56% rename from ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/AustraliaMiddleEastController.java rename to ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AustraliaMiddleEastController.java index 9040013ea..98f0edea0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RemoteSensing/AustraliaMiddleEastController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AustraliaMiddleEastController.java @@ -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 eastVOSList= australiaMiddleEastService.selectAustralia(); + List 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) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/GlobalTypeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/GlobalTypeController.java new file mode 100644 index 000000000..60716f416 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/GlobalTypeController.java @@ -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 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(); + } + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/OceanTemperatureController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/OceanTemperatureController.java new file mode 100644 index 000000000..b3f2e7b1c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/OceanTemperatureController.java @@ -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 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(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionVGIController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionVGIController.java new file mode 100644 index 000000000..f71be8a26 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionVGIController.java @@ -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 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(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionalSystemController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionalSystemController.java new file mode 100644 index 000000000..c7de177fe --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionalSystemController.java @@ -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 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(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialController.java new file mode 100644 index 000000000..5a2018480 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialController.java @@ -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 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 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 value = saveExcelAorest(file); + + return IntoAorestCoverage(value); + } + + /** + *平均植被覆盖度和净初级生产力 + */ + @RequestMapping(value = "/helpExcelnpp") + private AjaxResult helpExcelnpp(@RequestBody MultipartFile file) { + List value = saveExcelnpp(file); + + return IntoVegetation(value); + } + + /** + * 澳大利亚中部地区模板导入 + */ + @RequestMapping(value = "/helpExcelAus") + private AjaxResult helpExcelAus(@RequestBody MultipartFile file) { + List value = saveExcelAus(file); + + return IntoAustralia(value); + } + + /** + * 区域生态系统类型转移 + */ + @RequestMapping(value = "/helpExcelRegion") + private AjaxResult helpExcelRegion(@RequestBody MultipartFile file) { + List value = saveExcelRegion(file); + + return IntoRegional(value); + } + + public AjaxResult IntoRegional(List 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 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 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 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 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 saveExcel(MultipartFile file) { + + try { + List 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 saveExcelAus(MultipartFile file) { + + try { + List 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 saveExcelAorest(MultipartFile file) { + + try { + List 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 saveExcelnpp(MultipartFile file) { + + try { + List 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 saveExcelRegion(MultipartFile file) { + + try { + List 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; + } + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ThematicMapController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ThematicMapController.java new file mode 100644 index 000000000..22b0a5d97 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ThematicMapController.java @@ -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 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(); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/UrbanController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/UrbanController.java new file mode 100644 index 000000000..d95dcf485 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/UrbanController.java @@ -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 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(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/VegetationCoverageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/VegetationCoverageController.java new file mode 100644 index 000000000..8fff6fb69 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/VegetationCoverageController.java @@ -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 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(); + } +} diff --git a/ruoyi-admin/src/main/resources/META-INF/services/com.anji.captcha.service.CaptchaCacheService b/ruoyi-admin/src/main/resources/META-INF/services/com.anji.captcha.service.CaptchaCacheService new file mode 100644 index 000000000..b2442bc02 --- /dev/null +++ b/ruoyi-admin/src/main/resources/META-INF/services/com.anji.captcha.service.CaptchaCacheService @@ -0,0 +1 @@ +com.ruoyi.framework.web.service.CaptchaRedisService \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 44ae6554a..31dfb10a3 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -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 \ No newline at end of file + multi-statement-allow: true diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 0bbaeb4f1..8a97bdf3e 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -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/* diff --git a/ruoyi-admin/src/main/resources/banner.txt b/ruoyi-admin/src/main/resources/banner.txt index a02645ec3..72f29552c 100644 --- a/ruoyi-admin/src/main/resources/banner.txt +++ b/ruoyi-admin/src/main/resources/banner.txt @@ -1,24 +1,6 @@ -Application Version: ${ruoyi.version} -Spring Boot Version: ${spring-boot.version} -//////////////////////////////////////////////////////////////////// -// _ooOoo_ // -// o6666666o // -// 88" . "88 // -// (| ^_^ |) // -// O\ = /O // -// ____/`---'\____ // -// .' \\| |// `. // -// / \\||| : |||// \ // -// / _||||| -:- |||||- \ // -// | | \\\ - /// | | // -// | \_| ''\---/'' | | // -// \ .-\__ `-` ___/-. / // -// ___`. .' /--.--\ `. . ___ // -// ."" '< `.___\_<|>_/___.' >'"". // -// | | : `- \`.;`\ _ /`;.`/ - ` : | | // -// \ \ `-. \_ __\ /__ _/ .-` / / // -// ========`-.____`-.___\_____/___.-`____.-'======== // -// `=---=' // -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// 佛祖保佑 永不宕机 永无BUG // -//////////////////////////////////////////////////////////////////// \ No newline at end of file + _ + ( ) + | |/') _ __ ___ +(`\/')| , < ( '__)/',__) + > < | |\`\ | | \__, \ +(_/\_)(_) (_)(_) (____/ \ No newline at end of file diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/WeatherUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/WeatherUtils.java new file mode 100644 index 000000000..a29f23031 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/WeatherUtils.java @@ -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(Mapdata) { + //将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(); + } +} diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml index 39b2d88cf..8a18c2b25 100644 --- a/ruoyi-framework/pom.xml +++ b/ruoyi-framework/pom.xml @@ -35,18 +35,26 @@ druid-spring-boot-starter - + + - com.github.penggle - kaptcha - - - javax.servlet-api - javax.servlet - - + com.github.anji-plus + captcha-spring-boot-starter + 1.2.7 + + + + + + + + + + + + com.github.oshi diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/CaptchaConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/CaptchaConfig.java deleted file mode 100644 index 43e78aebe..000000000 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/CaptchaConfig.java +++ /dev/null @@ -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; - } -} diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/KaptchaTextCreator.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/KaptchaTextCreator.java deleted file mode 100644 index 3e7458003..000000000 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/KaptchaTextCreator.java +++ /dev/null @@ -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(); - } -} \ No newline at end of file diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 58dd02ad0..cdcff26ec 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -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() // 除上面外的所有请求全部需要鉴权认证 diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/CaptchaRedisService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/CaptchaRedisService.java new file mode 100644 index 000000000..01e288b7a --- /dev/null +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/CaptchaRedisService.java @@ -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"; + } +} \ No newline at end of file diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java index 6f8b9aa5c..09995d987 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java @@ -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); } -} +} \ No newline at end of file diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml index 0bf0eea90..6ff3ef6f7 100644 --- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml +++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml @@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{dictType}, #{sort}, #{createBy}, - sysdate() + current_timestamp ) @@ -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 where column_id = #{columnId} diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml index a5d014543..e99b74f32 100644 --- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml +++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml @@ -164,7 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{genPath}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) @@ -187,7 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" options = #{options}, update_by = #{updateBy}, remark = #{remark}, - update_time = sysdate() + update_time = current_timestamp where table_id = #{tableId} diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml index 588d17705..32966a1ca 100644 --- a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml +++ b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml @@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{jobMessage}, #{status}, #{exceptionInfo}, - sysdate() + current_timestamp ) diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml index 69233bdf7..15399c8ec 100644 --- a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml +++ b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml @@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where job_id = #{jobId} @@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/AorestCoverageVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/AorestCoverageVO.java new file mode 100644 index 000000000..4129f3b7e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/AorestCoverageVO.java @@ -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; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/vo/AustraliaMiddleEastVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/AustraliaMiddleEastVO.java similarity index 67% rename from ruoyi-system/src/main/java/com/ruoyi/system/vo/AustraliaMiddleEastVO.java rename to ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/AustraliaMiddleEastVO.java index 20c863231..37a1e34ff 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/vo/AustraliaMiddleEastVO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/AustraliaMiddleEastVO.java @@ -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; } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/CastsVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/CastsVo.java new file mode 100644 index 000000000..995efb013 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/CastsVo.java @@ -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; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/Dictionary.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/Dictionary.java new file mode 100644 index 000000000..c485023aa --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/Dictionary.java @@ -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; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/ForecastVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/ForecastVo.java new file mode 100644 index 000000000..3ca9773f8 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/ForecastVo.java @@ -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 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 getCasts() { + return casts; + } + + public void setCasts(List casts) { + this.casts = casts; + } +} + diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/GlobalTypeVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/GlobalTypeVO.java new file mode 100644 index 000000000..de15e7b67 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/GlobalTypeVO.java @@ -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; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/LivesVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/LivesVo.java new file mode 100644 index 000000000..6a5d3fefb --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/LivesVo.java @@ -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; + } + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/OceanTemperatureVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/OceanTemperatureVO.java new file mode 100644 index 000000000..121f4ac8b --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/OceanTemperatureVO.java @@ -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; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/vo/RegionVGIVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/RegionVGIVO.java similarity index 87% rename from ruoyi-system/src/main/java/com/ruoyi/system/vo/RegionVGIVO.java rename to ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/RegionVGIVO.java index 379df3396..41601576b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/vo/RegionVGIVO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/RegionVGIVO.java @@ -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; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/RegionalSystemVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/RegionalSystemVO.java new file mode 100644 index 000000000..3a36550b4 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/RegionalSystemVO.java @@ -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; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysBaseEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/SysBaseEntity.java similarity index 75% rename from ruoyi-system/src/main/java/com/ruoyi/system/domain/SysBaseEntity.java rename to ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/SysBaseEntity.java index 430d60c88..bdef7faee 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysBaseEntity.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/SysBaseEntity.java @@ -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; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/ThematicMapDomain.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/ThematicMapDomain.java new file mode 100644 index 000000000..11caf150e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/ThematicMapDomain.java @@ -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 + + '}'; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UploadFile.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UploadFile.java new file mode 100644 index 000000000..6d0529a9f --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UploadFile.java @@ -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; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UrbanVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UrbanVO.java new file mode 100644 index 000000000..04ce9382d --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UrbanVO.java @@ -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; +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/VegetationCoverageVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/VegetationCoverageVO.java new file mode 100644 index 000000000..ad01b1bfb --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/VegetationCoverageVO.java @@ -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; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/WeatherUtilsVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/WeatherUtilsVO.java new file mode 100644 index 000000000..e7449cc81 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/WeatherUtilsVO.java @@ -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 lives; + /** + * 预报天气 + */ + private List 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 getForecasts() { + return forecasts; + } + + public void setForecasts(List forecasts) { + this.forecasts = forecasts; + } + + public List getLives() { + return lives; + } + + public void setLives(List lives) { + this.lives = lives; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AdahTestingMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AdahTestingMapper.java deleted file mode 100644 index bf493c8e8..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AdahTestingMapper.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.ruoyi.system.mapper; - -/** - * @Author: JinSheng Song - * @Date: 2022/5/11 15:17 - */ -public interface AdahTestingMapper { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AtmosphereMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AtmosphereMapper.java deleted file mode 100644 index 65c0d27c0..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AtmosphereMapper.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.ruoyi.system.mapper; - -/** - * @Author: JinSheng Song - * @Date: 2022/5/11 15:17 - */ -public interface AtmosphereMapper { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ENSOMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ENSOMapper.java deleted file mode 100644 index d5bed2f89..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ENSOMapper.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.ruoyi.system.mapper; - -/** - * @Author: JinSheng Song - * @Date: 2022/5/11 15:18 - */ -public interface ENSOMapper { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ForestMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ForestMapper.java deleted file mode 100644 index 0942f03a0..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ForestMapper.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.ruoyi.system.mapper; - -/** - * @Author: JinSheng Song - * @Date: 2022/5/11 15:18 - */ -public interface ForestMapper { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/GlobalEcologyMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/GlobalEcologyMapper.java deleted file mode 100644 index 2cbfa8766..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/GlobalEcologyMapper.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.ruoyi.system.mapper; - -/** - * @Author: JinSheng Song - * @Date: 2022/5/11 15:18 - */ -public interface GlobalEcologyMapper { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UrbanMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UrbanMapper.java deleted file mode 100644 index 05cac67fc..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UrbanMapper.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.ruoyi.system.mapper; - -/** - * @Author: JinSheng Song - * @Date: 2022/5/11 15:18 - */ -public interface UrbanMapper { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/AorestCoverageMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/AorestCoverageMapper.java new file mode 100644 index 000000000..7bfa3610d --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/AorestCoverageMapper.java @@ -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 selectAorestCoverage(/*@Param("region") String region, + @Param("particularYear") String particularYear*/); + + Integer DelAorestCoverage(@Param("id") String id); + + Integer IntoAorestCoverage(AorestCoverageVO eastVO); + + Integer IntoUpload(UploadFile file); + + List selectUpload(@Param("fileId") String fileId,@Param("fileName") String fileName); + + List selectDic(@Param("codingType") String codingType,@Param("codingType1") String codingType1, + @Param("codingType2") String codingType2); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AustraliaMiddleEastMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/AustraliaMiddleEastMapper.java similarity index 54% rename from ruoyi-system/src/main/java/com/ruoyi/system/mapper/AustraliaMiddleEastMapper.java rename to ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/AustraliaMiddleEastMapper.java index 9293c5b94..aa2de864a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AustraliaMiddleEastMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/AustraliaMiddleEastMapper.java @@ -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 selectAustralia(); + List selectAustralia(@Param("yearMonth") String yearMonth, + @Param("month") String month); Integer DelAustralia(@Param("id") String id); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/GlobalTypeMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/GlobalTypeMapper.java new file mode 100644 index 000000000..8366c5ce6 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/GlobalTypeMapper.java @@ -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 selectGlobalType(@Param("typeName") String typeName, @Param("particularYear") Integer particularYear); + + Integer DelGlobalType(@Param("id") String id); + + Integer IntoGlobalType(GlobalTypeVO typeVO); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/OceanTemperatureMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/OceanTemperatureMapper.java new file mode 100644 index 000000000..35f85afe1 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/OceanTemperatureMapper.java @@ -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 selectOcean(@Param("startDate") LocalDate startDate); + + Integer DelOcean(@Param("id") String id); + + Integer IntoOcean(OceanTemperatureVO eastVO); + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RegionVGIMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/RegionVGIMapper.java similarity index 51% rename from ruoyi-system/src/main/java/com/ruoyi/system/mapper/RegionVGIMapper.java rename to ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/RegionVGIMapper.java index c44334dcb..6887a98c2 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RegionVGIMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/RegionVGIMapper.java @@ -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 selectRegion(); + List selectRegion(/*@Param("typeName") String typeName, + @Param("particularYear") String particularYear*/); Integer DelRegion(@Param("id") String id); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/RegionalSystemMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/RegionalSystemMapper.java new file mode 100644 index 000000000..a701950b5 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/RegionalSystemMapper.java @@ -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 selectRegional(@Param("region") String region); + + Integer DelRegional(@Param("id") String id); + + Integer IntoRegional(RegionalSystemVO eastVO); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ThematicMapMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ThematicMapMapper.java new file mode 100644 index 000000000..f0d89f57b --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ThematicMapMapper.java @@ -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 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); + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/UrbanMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/UrbanMapper.java new file mode 100644 index 000000000..fded526c3 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/UrbanMapper.java @@ -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 selectUrban(@Param("name") String name, + @Param("particularYear") String particularYear); + + Integer DelUrban(@Param("id") String id); + + Integer IntoUrban(UrbanVO eastVO); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/VegetationCoverageMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/VegetationCoverageMapper.java new file mode 100644 index 000000000..c8bbe124e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/VegetationCoverageMapper.java @@ -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 selectVegetation(/*@Param("region") String region, + @Param("particularYear") String particularYear*/); + + Integer DelVegetation(@Param("id") String id); + + Integer IntoVegetation(VegetationCoverageVO eastVO); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAdahTestingService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAdahTestingService.java deleted file mode 100644 index 507b367bf..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAdahTestingService.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.system.service; - -/** - * 亚大综合监测 - * @Author: JinSheng Song - * @Date: 2022/5/11 11:32 - */ -public interface IAdahTestingService { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAtmosphereService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAtmosphereService.java deleted file mode 100644 index d91916e4a..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAtmosphereService.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.system.service; - -/** - * 大气质量监测 - * @Author: JinSheng Song - * @Date: 2022/5/11 11:34 - */ -public interface IAtmosphereService { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IENSOService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IENSOService.java deleted file mode 100644 index c062f4dfa..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IENSOService.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.system.service; - -/** - * ENSO影响监测 - * @Author: JinSheng Song - * @Date: 2022/5/11 11:35 - */ -public interface IENSOService { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IForestService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IForestService.java deleted file mode 100644 index d763f2898..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IForestService.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.system.service; - -/** - * 森林监测 - * @Author: JinSheng Song - * @Date: 2022/5/11 11:38 - */ -public interface IForestService { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IGlobalEcologyService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IGlobalEcologyService.java deleted file mode 100644 index 007914e19..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IGlobalEcologyService.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.system.service; - -/** - * 全球生态环境监测 - * @Author: JinSheng Song - * @Date: 2022/5/11 11:37 - */ -public interface IGlobalEcologyService { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IRegionVGIService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IRegionVGIService.java deleted file mode 100644 index 1cf8d34d7..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IRegionVGIService.java +++ /dev/null @@ -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 selectRegion(); - - public Integer DelRegion(@Param("id") String id); - - public Integer IntoRegion(RegionVGIVO eastVO); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IUrbanService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IUrbanService.java deleted file mode 100644 index c9d7c75bd..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IUrbanService.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ruoyi.system.service; - -/** - * 城市监测 - * @Author: JinSheng Song - * @Date: 2022/5/11 11:40 - */ -public interface IUrbanService { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AdahTestingServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AdahTestingServiceimpl.java deleted file mode 100644 index 68c0c741d..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AdahTestingServiceimpl.java +++ /dev/null @@ -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 { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AtmosphereServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AtmosphereServiceimpl.java deleted file mode 100644 index 99ccb59f1..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AtmosphereServiceimpl.java +++ /dev/null @@ -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 { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ENSOServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ENSOServiceimpl.java deleted file mode 100644 index 490815b49..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ENSOServiceimpl.java +++ /dev/null @@ -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 { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ForestServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ForestServiceimpl.java deleted file mode 100644 index cd3b6e1e4..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ForestServiceimpl.java +++ /dev/null @@ -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 { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GlobalEcologyServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GlobalEcologyServiceimpl.java deleted file mode 100644 index 104ee944c..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GlobalEcologyServiceimpl.java +++ /dev/null @@ -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 { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UrbanServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UrbanServiceimpl.java deleted file mode 100644 index 02417b848..000000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UrbanServiceimpl.java +++ /dev/null @@ -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 { -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IAorestCoverageService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IAorestCoverageService.java new file mode 100644 index 000000000..86ef91dd0 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IAorestCoverageService.java @@ -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 selectAorestCoverage(/*String region,String particularYear*/); + + public Integer DelAorestCoverage(String id); + + public Integer IntoAorestCoverage(AorestCoverageVO eastVO); + + public Integer IntoUpload(UploadFile file); + + public List selectUpload(String fileId,String fileName); + + List selectDic(String codingType,String codingType1, + String codingType2); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAustraliaMiddleEastService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IAustraliaMiddleEastService.java similarity index 64% rename from ruoyi-system/src/main/java/com/ruoyi/system/service/IAustraliaMiddleEastService.java rename to ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IAustraliaMiddleEastService.java index 01f552567..1e7b21bb7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAustraliaMiddleEastService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IAustraliaMiddleEastService.java @@ -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 selectAustralia(); + public List selectAustralia(String yearMonth,String month); public Integer DelAustralia(@Param("id") String id); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IGlobalTypeService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IGlobalTypeService.java new file mode 100644 index 000000000..08804ac47 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IGlobalTypeService.java @@ -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 selectGlobalType(String typeName, Integer particularYear); + + public Integer DelGlobalType(String id); + + public Integer IntoGlobalType(GlobalTypeVO typeVO); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IOceanTemperatureService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IOceanTemperatureService.java new file mode 100644 index 000000000..d6b95b4ca --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IOceanTemperatureService.java @@ -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 selectOcean(LocalDate startDate); + + public Integer DelOcean(@Param("id") String id); + + public Integer IntoOcean(OceanTemperatureVO eastVO); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IRegionVGIService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IRegionVGIService.java new file mode 100644 index 000000000..4c9b47f7b --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IRegionVGIService.java @@ -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 selectRegion(/*String typeName,String particularYear*/); + + /** + * 删除 + * @param id + * @return + */ + public Integer DelRegion(@Param("id") String id); + + /** + * 添加 + * @param eastVO + * @return + */ + public Integer IntoRegion(RegionVGIVO eastVO); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IRegionalSystemService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IRegionalSystemService.java new file mode 100644 index 000000000..537461d7b --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IRegionalSystemService.java @@ -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 selectRegional(String region); + + public Integer DelRegional(@Param("id") String id); + + public Integer IntoRegional(RegionalSystemVO eastVO); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISpecialReportService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ISpecialReportService.java similarity index 75% rename from ruoyi-system/src/main/java/com/ruoyi/system/service/ISpecialReportService.java rename to ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ISpecialReportService.java index 7c098d7ca..0f677a36c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISpecialReportService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ISpecialReportService.java @@ -1,4 +1,4 @@ -package com.ruoyi.system.service; +package com.ruoyi.system.service_yada; /** * 专题报告 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IUrbanService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IUrbanService.java new file mode 100644 index 000000000..9dcbd12fe --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IUrbanService.java @@ -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 selectUrban(String name, String particularYear); + + public Integer DelUrban(@Param("id") String id); + + public Integer IntoUrban(UrbanVO eastVO); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IVegetationCoverageService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IVegetationCoverageService.java new file mode 100644 index 000000000..c3e141b91 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IVegetationCoverageService.java @@ -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 selectVegetation(/*String region,String particularYear*/); + + public Integer DelVegetation(String id); + + public Integer IntoVegetation(VegetationCoverageVO eastVO); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ThematicMapService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ThematicMapService.java new file mode 100644 index 000000000..d25e7ceb1 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ThematicMapService.java @@ -0,0 +1,37 @@ +package com.ruoyi.system.service_yada; + +import com.ruoyi.system.domain_yada.ThematicMapDomain; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * 专题图服务 + * @Author: taco chen + * @Date: 2022/5/11 11:40 + */ +public interface ThematicMapService { + + + /** + * 获取全部专题图 + * @return + */ + List selectAll(String pictureType,String pictureTypeOne, String pictureTypeTwo); + + /** + * 删除专题图根据编号 + * @param id 编号 + * @return + */ + Integer deleteById(Long id); + + /** + * 保存专题图 + * @param thematicMapDomain + * @return + */ + Integer save(ThematicMapDomain thematicMapDomain); + + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/AorestCoverageServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/AorestCoverageServiceimpl.java new file mode 100644 index 000000000..334673dbe --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/AorestCoverageServiceimpl.java @@ -0,0 +1,58 @@ +package com.ruoyi.system.service_yada.impl; + +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 com.ruoyi.system.mapper_yada.AorestCoverageMapper; +import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper; +import com.ruoyi.system.service_yada.IAorestCoverageService; +import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 森林覆盖率 + * @Author: JinSheng Song + * @Date: 2022/5/11 11:43 + */ +@Service +public class AorestCoverageServiceimpl implements IAorestCoverageService { + @Resource + private AorestCoverageMapper coverageMapper; + + + @Override + public List selectAorestCoverage(/*String region,String particularYear*/) { + return coverageMapper.selectAorestCoverage(/*region,particularYear*/); + } + + @Override + public Integer DelAorestCoverage(String id) { + return coverageMapper.DelAorestCoverage(id); + } + + @Override + public Integer IntoAorestCoverage(AorestCoverageVO eastVO) { + return coverageMapper.IntoAorestCoverage(eastVO); + } + + @Override + public Integer IntoUpload(UploadFile file) { + return coverageMapper.IntoUpload(file); + } + + @Override + public List selectUpload(String fileId, String fileName) { + return coverageMapper.selectUpload(fileId,fileName); + } + + @Override + public List selectDic(String codingType,String codingType1, + String codingType2) { + return coverageMapper.selectDic(codingType,codingType1,codingType2); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AustraliaMiddleEastServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/AustraliaMiddleEastServiceimpl.java similarity index 55% rename from ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AustraliaMiddleEastServiceimpl.java rename to ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/AustraliaMiddleEastServiceimpl.java index 3fa866dd6..df0e040de 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AustraliaMiddleEastServiceimpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/AustraliaMiddleEastServiceimpl.java @@ -1,11 +1,12 @@ -package com.ruoyi.system.service.impl; +package com.ruoyi.system.service_yada.impl; -import com.ruoyi.system.mapper.AustraliaMiddleEastMapper; -import com.ruoyi.system.mapper.SysLogininforMapper; -import com.ruoyi.system.service.IAustraliaMiddleEastService; -import com.ruoyi.system.vo.AustraliaMiddleEastVO; +import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper; +import com.ruoyi.system.service_yada.IAustraliaMiddleEastService; +import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.List; /** @@ -13,15 +14,16 @@ import java.util.List; * @Author: JinSheng Song * @Date: 2022/5/11 11:43 */ +@Service public class AustraliaMiddleEastServiceimpl implements IAustraliaMiddleEastService { - @Autowired + @Resource private AustraliaMiddleEastMapper australiaMiddleEastMapper; @Override - public List selectAustralia() + public List selectAustralia(String yearMonth,String month) { - return australiaMiddleEastMapper.selectAustralia(); + return australiaMiddleEastMapper.selectAustralia(yearMonth,month); } @Override diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/GlobalTypeServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/GlobalTypeServiceimpl.java new file mode 100644 index 000000000..a86b6c23f --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/GlobalTypeServiceimpl.java @@ -0,0 +1,42 @@ +package com.ruoyi.system.service_yada.impl; + +import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; +import com.ruoyi.system.domain_yada.GlobalTypeVO; +import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper; +import com.ruoyi.system.mapper_yada.GlobalTypeMapper; +import com.ruoyi.system.service_yada.IGlobalTypeService; +import org.apache.commons.compress.archivers.dump.DumpArchiveEntry; +import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 全球各类型占比 + * @Author: JinSheng Song + * @Date: 2022/5/11 11:47 + */ +@Service +public class GlobalTypeServiceimpl implements IGlobalTypeService { + + @Resource + private GlobalTypeMapper typeMapper; + + + @Override + public List selectGlobalType(String typeName, Integer particularYear) { + return typeMapper.selectGlobalType(typeName, particularYear); + } + + @Override + public Integer DelGlobalType(String id) { + return typeMapper.DelGlobalType(id); + } + + @Override + public Integer IntoGlobalType(GlobalTypeVO typeVO) { + return typeMapper.IntoGlobalType(typeVO); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/OceanTemperatureServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/OceanTemperatureServiceimpl.java new file mode 100644 index 000000000..596ee1917 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/OceanTemperatureServiceimpl.java @@ -0,0 +1,41 @@ +package com.ruoyi.system.service_yada.impl; + +import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; +import com.ruoyi.system.domain_yada.OceanTemperatureVO; +import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper; +import com.ruoyi.system.mapper_yada.OceanTemperatureMapper; +import com.ruoyi.system.service_yada.IOceanTemperatureService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDate; +import java.util.List; + +/** + * 森林监测 + * @Author: JinSheng Song + * @Date: 2022/5/11 11:47 + */ +@Service +public class OceanTemperatureServiceimpl implements IOceanTemperatureService { + + @Resource + private OceanTemperatureMapper oceanMapper; + + + @Override + public List selectOcean(LocalDate startDate) { + return oceanMapper.selectOcean(startDate); + } + + @Override + public Integer DelOcean(String id) { + return oceanMapper.DelOcean(id); + } + + @Override + public Integer IntoOcean(OceanTemperatureVO eastVO) { + return oceanMapper.IntoOcean(eastVO); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RegionVGIServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/RegionVGIServiceimpl.java similarity index 50% rename from ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RegionVGIServiceimpl.java rename to ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/RegionVGIServiceimpl.java index 60966b5dc..6beb25cd4 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RegionVGIServiceimpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/RegionVGIServiceimpl.java @@ -1,11 +1,13 @@ -package com.ruoyi.system.service.impl; +package com.ruoyi.system.service_yada.impl; -import com.ruoyi.system.mapper.AustraliaMiddleEastMapper; -import com.ruoyi.system.mapper.RegionVGIMapper; -import com.ruoyi.system.service.IRegionVGIService; -import com.ruoyi.system.vo.RegionVGIVO; +import com.ruoyi.system.mapper_yada.RegionVGIMapper; +import com.ruoyi.system.service_yada.IRegionVGIService; +import com.ruoyi.system.domain_yada.RegionVGIVO; +import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.List; /** @@ -13,14 +15,15 @@ import java.util.List; * @Author: JinSheng Song * @Date: 2022/5/11 11:45 */ +@Service public class RegionVGIServiceimpl implements IRegionVGIService { - @Autowired + @Resource private RegionVGIMapper vgiMapper; @Override - public List selectRegion() { - return vgiMapper.selectRegion(); + public List selectRegion(/*String typeName,String particularYear*/) { + return vgiMapper.selectRegion(/*typeName,particularYear*/); } @Override diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/RegionalSystemServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/RegionalSystemServiceimpl.java new file mode 100644 index 000000000..8ec0932ea --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/RegionalSystemServiceimpl.java @@ -0,0 +1,42 @@ +package com.ruoyi.system.service_yada.impl; + +import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; +import com.ruoyi.system.domain_yada.RegionalSystemVO; +import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper; +import com.ruoyi.system.mapper_yada.RegionalSystemMapper; +import com.ruoyi.system.service_yada.IRegionalSystemService; +import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 区域生态系统 + * @Author: JinSheng Song + * @Date: 2022/5/11 11:46 + */ +@Service +public class RegionalSystemServiceimpl implements IRegionalSystemService { + + @Resource + private RegionalSystemMapper Regional; + + + @Override + public List selectRegional(String region) { + return Regional.selectRegional(region); + } + + @Override + public Integer DelRegional(String id) { + return Regional.DelRegional(id); + } + + @Override + public Integer IntoRegional(RegionalSystemVO eastVO) { + return Regional.IntoRegional(eastVO); + } + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SpecialReportServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/SpecialReportServiceimpl.java similarity index 59% rename from ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SpecialReportServiceimpl.java rename to ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/SpecialReportServiceimpl.java index 7c2959511..e96cd19b8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SpecialReportServiceimpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/SpecialReportServiceimpl.java @@ -1,6 +1,6 @@ -package com.ruoyi.system.service.impl; +package com.ruoyi.system.service_yada.impl; -import com.ruoyi.system.service.ISpecialReportService; +import com.ruoyi.system.service_yada.ISpecialReportService; /** * 专题报告 @@ -8,4 +8,5 @@ import com.ruoyi.system.service.ISpecialReportService; * @Date: 2022/5/11 11:48 */ public class SpecialReportServiceimpl implements ISpecialReportService { + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ThematicMapServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ThematicMapServiceImpl.java new file mode 100644 index 000000000..1c5c939a3 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ThematicMapServiceImpl.java @@ -0,0 +1,51 @@ +package com.ruoyi.system.service_yada.impl; + +import com.ruoyi.system.domain_yada.ThematicMapDomain; +import com.ruoyi.system.mapper_yada.ThematicMapMapper; +import com.ruoyi.system.service_yada.ThematicMapService; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.List; + +/** + * * 专题图服务 + * @author : taco chen + */ +@Service +public class ThematicMapServiceImpl implements ThematicMapService { + + @Resource + private ThematicMapMapper thematicMapMapper; + + /** + * 获取全部专题图 + * @return + */ + @Override + public List selectAll(String pictureType,String pictureTypeOne, String pictureTypeTwo){ + return thematicMapMapper.selectAllThematicMap(pictureType,pictureTypeOne,pictureTypeTwo); + } + + /** + * 删除专题图根据编号 + * @param id 编号 + * @return + */ + @Override + public Integer deleteById(Long id){ + return thematicMapMapper.deleteThematicMap(id); + } + + /** + * 保存专题图 + * @param thematicMapDomain + * @return + */ + @Override + public Integer save(ThematicMapDomain thematicMapDomain){ + return thematicMapMapper.saveThematicMap(thematicMapDomain); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/UrbanServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/UrbanServiceimpl.java new file mode 100644 index 000000000..db09793cd --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/UrbanServiceimpl.java @@ -0,0 +1,40 @@ +package com.ruoyi.system.service_yada.impl; + +import com.ruoyi.system.domain_yada.UrbanVO; +import com.ruoyi.system.mapper_yada.AorestCoverageMapper; +import com.ruoyi.system.mapper_yada.UrbanMapper; +import com.ruoyi.system.service_yada.IUrbanService; +import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * * 城市监测 + * @Author: JinSheng Song + * @Date: 2022/5/11 11:49 + */ +@Service +public class UrbanServiceimpl implements IUrbanService { + + @Resource + private UrbanMapper urbanMapper; + + @Override + + public List selectUrban(String name, String particularYear) { + return urbanMapper.selectUrban(name,particularYear); + } + + @Override + public Integer DelUrban(String id) { + return urbanMapper.DelUrban(id); + } + + @Override + public Integer IntoUrban(UrbanVO eastVO) { + return urbanMapper.IntoUrban(eastVO); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/VegetationCoverageServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/VegetationCoverageServiceimpl.java new file mode 100644 index 000000000..69d7fd586 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/VegetationCoverageServiceimpl.java @@ -0,0 +1,42 @@ +package com.ruoyi.system.service_yada.impl; + +import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; +import com.ruoyi.system.domain_yada.VegetationCoverageVO; +import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper; +import com.ruoyi.system.mapper_yada.VegetationCoverageMapper; +import com.ruoyi.system.service_yada.IVegetationCoverageService; +import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 平均植被覆盖度和净初级生产力 + * @Author: JinSheng Song + * @Date: 2022/5/11 11:45 + */ +@Service +public class VegetationCoverageServiceimpl implements IVegetationCoverageService { + + + @Resource + private VegetationCoverageMapper coverageMapper; + + + @Override + public List selectVegetation(/*String region,String particularYear*/) { + return coverageMapper.selectVegetation(/*region,particularYear*/); + } + + @Override + public Integer DelVegetation(String id) { + return coverageMapper.DelVegetation(id); + } + + @Override + public Integer IntoVegetation(VegetationCoverageVO eastVO) { + return coverageMapper.IntoVegetation(eastVO); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/AdahTestingMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AdahTestingMapper.xml deleted file mode 100644 index 7bec5b4e5..000000000 --- a/ruoyi-system/src/main/resources/mapper/system/AdahTestingMapper.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/AorestCoverageMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AorestCoverageMapper.xml new file mode 100644 index 000000000..d19f0ab8b --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/AorestCoverageMapper.xml @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM forest_coverage + WHERE ID=#{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/AtmosphereMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AtmosphereMapper.xml deleted file mode 100644 index 708cc972f..000000000 --- a/ruoyi-system/src/main/resources/mapper/system/AtmosphereMapper.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/AustraliaMiddleEastMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AustraliaMiddleEastMapper.xml index b0de66317..477653950 100644 --- a/ruoyi-system/src/main/resources/mapper/system/AustraliaMiddleEastMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/AustraliaMiddleEastMapper.xml @@ -2,28 +2,36 @@ - - + + - + + - - + + @@ -34,8 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/ruoyi-system/src/main/resources/mapper/system/ENSOMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ENSOMapper.xml deleted file mode 100644 index b457a2528..000000000 --- a/ruoyi-system/src/main/resources/mapper/system/ENSOMapper.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/ForestMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ForestMapper.xml deleted file mode 100644 index 665c6a13e..000000000 --- a/ruoyi-system/src/main/resources/mapper/system/ForestMapper.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/GlobalEcologyMapper.xml b/ruoyi-system/src/main/resources/mapper/system/GlobalEcologyMapper.xml deleted file mode 100644 index 51d7e8555..000000000 --- a/ruoyi-system/src/main/resources/mapper/system/GlobalEcologyMapper.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/GlobalTypeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/GlobalTypeMapper.xml new file mode 100644 index 000000000..5ed298ce6 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/GlobalTypeMapper.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM proportion_of_global_types + WHERE ID=#{id} + + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/OceanTemperatureMapper.xml b/ruoyi-system/src/main/resources/mapper/system/OceanTemperatureMapper.xml new file mode 100644 index 000000000..d4484da00 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/OceanTemperatureMapper.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM sea_surface_temperature_anomaly + WHERE ID=#{id} + + + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/RegionVGIMapper.xml b/ruoyi-system/src/main/resources/mapper/system/RegionVGIMapper.xml index b1eb0efe3..14c408696 100644 --- a/ruoyi-system/src/main/resources/mapper/system/RegionVGIMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/RegionVGIMapper.xml @@ -2,8 +2,8 @@ - - + + @@ -25,7 +25,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -50,9 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) VALUES ( #{id,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR}, - #{region_en,jdbcType=VARCHAR}, - #{type_name,jdbcType=VARCHAR}, - #{type_name_en,jdbcType=TIMESTAMP}, + #{regionEn,jdbcType=VARCHAR}, + #{typeName,jdbcType=VARCHAR}, + #{typeNameEn,jdbcType=TIMESTAMP}, #{forest,jdbcType=DOUBLE}, #{createdBy,jdbcType=VARCHAR}, #{createdTime,jdbcType=DATE}, diff --git a/ruoyi-system/src/main/resources/mapper/system/RegionalSystemMapper.xml b/ruoyi-system/src/main/resources/mapper/system/RegionalSystemMapper.xml new file mode 100644 index 000000000..ce6febee1 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/RegionalSystemMapper.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM proportion_of_ecosystem_type_transfer + WHERE ID=#{id} + + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml index b1570e289..d14d1b9e7 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml @@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{configType}, #{createBy}, #{remark}, - sysdate() + current_timestamp ) @@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" config_type = #{configType}, update_by = #{updateBy}, remark = #{remark}, - update_time = sysdate() + update_time = current_timestamp where config_id = #{configId} diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 984f89ccc..6a563e85e 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -109,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{email}, #{status}, #{createBy}, - sysdate() + current_timestamp ) @@ -125,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" email = #{email}, status = #{status}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where dept_id = #{deptId} diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml index 75d80a157..f7b5d5d68 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml @@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where dict_code = #{dictCode} @@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml index 2b44b2eee..6d65a7921 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml @@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where dict_id = #{dictId} @@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml index 26d51fa39..cb4441247 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml @@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) - values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate()) + values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, current_timestamp) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml index 2425ae058..8b73469a3 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml @@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where post_id = #{postId} @@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index a8d3ede58..2a34ceef1 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) @@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where role_id = #{roleId} diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 16a64c2a3..df55eda3d 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -170,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{createBy}, #{remark}, - sysdate() + current_timestamp ) @@ -190,7 +190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" login_date = #{loginDate}, update_by = #{updateBy}, remark = #{remark}, - update_time = sysdate() + update_time = current_timestamp where user_id = #{userId} diff --git a/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml new file mode 100644 index 000000000..ede0bdbbf --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM thematic_map + WHERE ID=#{id} + + + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/UrbanMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UrbanMapper.xml index 7756d3cf9..58e3e1be8 100644 --- a/ruoyi-system/src/main/resources/mapper/system/UrbanMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/UrbanMapper.xml @@ -2,7 +2,61 @@ - + + + + + + + + + + + + + + + + + + + + DELETE FROM urban_agglomeration_china + WHERE ID=#{id} + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/VegetationCoverageMapper.xml b/ruoyi-system/src/main/resources/mapper/system/VegetationCoverageMapper.xml new file mode 100644 index 000000000..9e6babe97 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/VegetationCoverageMapper.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM fvc_npp + WHERE ID=#{id} + + + + + + + \ No newline at end of file diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index 18b2a3ed4..302ecd1ab 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -1,11 +1,11 @@ -# 页面标题 -VUE_APP_TITLE = 若依管理系统 - -# 开发环境配置 -ENV = 'development' - -# 若依管理系统/开发环境 -VUE_APP_BASE_API = '/dev-api' - -# 路由懒加载 -VUE_CLI_BABEL_TRANSPILE_MODULES = true +# 页面标题 +VUE_APP_TITLE = 若依管理系统 + +# 开发环境配置 +ENV = 'development' + +# 若依管理系统/开发环境 +VUE_APP_BASE_API = '/dev-api' + +# 路由懒加载 +VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/ruoyi-ui/src/views/tool/swagger/index.vue b/ruoyi-ui/src/views/tool/swagger/index.vue index 750189115..400f3a2fe 100644 --- a/ruoyi-ui/src/views/tool/swagger/index.vue +++ b/ruoyi-ui/src/views/tool/swagger/index.vue @@ -8,7 +8,8 @@ export default { components: { iFrame }, data() { return { - url: process.env.VUE_APP_BASE_API + "/swagger-ui/index.html" + // url: process.env.VUE_APP_BASE_API + "/swagger-ui/index.html" + url: process.env.VUE_APP_BASE_API + "/doc.html" }; }, };