commit a5bfbf3624221c770d5c7ca6d1db317d3585da3a
Author: cyFeng <123456789@qq.com>
Date: Tue Nov 28 15:07:59 2023 +0800
first commit
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..153c933
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,29 @@
+HELP.md
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/build/
+
+### VS Code ###
+.vscode/
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1de2fb2
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# mysql-oracle-dynamic-datasource
+SpringBoot集成MyBatis-Plus动态数据源测试,同时集成Mysql和Oracle
+射阳源数据表接入
diff --git a/config/application.properties b/config/application.properties
new file mode 100644
index 0000000..c7ce1c1
--- /dev/null
+++ b/config/application.properties
@@ -0,0 +1,4 @@
+#ʵеַ봦
+sydzSwitch=false
+#βѯ
+oncesCounts=10000
diff --git a/config/logback.xml b/config/logback.xml
new file mode 100644
index 0000000..630449f
--- /dev/null
+++ b/config/logback.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+ ${log.pattern}
+
+
+
+
+
+ ${log.path}/sys-info.log
+
+
+
+ ${log.path}/sys-info.%d{yyyy-MM-dd}.log
+
+ 7
+
+
+ ${log.pattern}
+
+
+
+ INFO
+
+ ACCEPT
+
+ DENY
+
+
+
+
+ ${log.path}/sys-error.log
+
+
+
+ ${log.path}/sys-error.%d{yyyy-MM-dd}.log
+
+ 7
+
+
+ ${log.pattern}
+
+
+
+ ERROR
+
+ ACCEPT
+
+ DENY
+
+
+
+
+
+ ${log.path}/sys-user.log
+
+
+ ${log.path}/sys-user.%d{yyyy-MM-dd}.log
+
+ 7
+
+
+ ${log.pattern}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mvnw b/mvnw
new file mode 100644
index 0000000..8b9da3b
--- /dev/null
+++ b/mvnw
@@ -0,0 +1,286 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ wget "$jarUrl" -O "$wrapperJarPath"
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ curl -o "$wrapperJarPath" "$jarUrl"
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
new file mode 100644
index 0000000..fef5a8f
--- /dev/null
+++ b/mvnw.cmd
@@ -0,0 +1,161 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ echo Found %WRAPPER_JAR%
+) else (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
+ echo Finished downloading %WRAPPER_JAR%
+)
+@REM End of extension
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..f71549e
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,113 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.1.4.RELEASE
+
+
+ com.ssf
+ dataCompareSy
+ 0.0.1-SNAPSHOT
+
+ Demo project for Spring Boot
+
+
+ 1.8
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ 3.1.1
+
+
+
+ com.baomidou
+ dynamic-datasource-spring-boot-starter
+ 2.5.4
+
+
+
+ mysql
+ mysql-connector-java
+ runtime
+
+
+
+ com.oracle
+ ojdbc6
+ 11.2.0.3
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+
+ com.alibaba
+ fastjson
+ 1.2.4
+
+
+
+
+ cn.hutool
+ hutool-all
+ 5.8.16
+
+
+
+
+ org.apache.commons
+ commons-lang3
+ 3.6
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ true
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/ssf/mysqloracletest/MysqlOracleTestApplication.java b/src/main/java/com/ssf/mysqloracletest/MysqlOracleTestApplication.java
new file mode 100644
index 0000000..de6f34b
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/MysqlOracleTestApplication.java
@@ -0,0 +1,24 @@
+package com.ssf.mysqloracletest;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@SpringBootApplication
+@MapperScan("com.ssf.mysqloracletest.mapper")
+@EnableScheduling
+@EnableAsync(proxyTargetClass = true)
+public class MysqlOracleTestApplication {
+ private static final Logger logger = LoggerFactory.getLogger(MysqlOracleTestApplication.class);
+
+ public static void main(String[] args) {
+ SpringApplication.run(MysqlOracleTestApplication.class, args);
+ logger.info("---历史版本号--:1.0.0,版本描述初始化项目");
+ logger.info("---当前版本号--:1.0.1,实有人口接入,标准地址接入处理,居住证图片接入处理,实有人口补充图片处理,根据 住户信息表里面没有图片的记录,去查户籍表的原始orcl表,有记录则回填到实有人口表里面");
+ }
+
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/domain/VSySydzMysql.java b/src/main/java/com/ssf/mysqloracletest/domain/VSySydzMysql.java
new file mode 100644
index 0000000..1c8ebf1
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/domain/VSySydzMysql.java
@@ -0,0 +1,22 @@
+package com.ssf.mysqloracletest.domain;
+
+import lombok.Data;
+
+@Data
+public class VSySydzMysql {
+
+ /**
+ * 主键
+ */
+ private String DZDXMC;
+ private String CJSJ;
+ private String ZRQDM;
+ private String JDZB;
+ private String WDZB;
+
+ private String DZDXTYMC;
+ private String SJDZYSID;
+ private String DZYSID;
+
+}
+
diff --git a/src/main/java/com/ssf/mysqloracletest/domain/VSySydzOracle.java b/src/main/java/com/ssf/mysqloracletest/domain/VSySydzOracle.java
new file mode 100644
index 0000000..5e6828c
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/domain/VSySydzOracle.java
@@ -0,0 +1,22 @@
+package com.ssf.mysqloracletest.domain;
+
+import lombok.Data;
+
+@Data
+public class VSySydzOracle {
+
+ /**
+ * 主键
+ */
+ private String DZDXMC;
+ private String CJSJ;
+ private String ZRQDM;
+ private String JDZB;
+ private String WDZB;
+
+ private String DZDXTYMC;
+ private String SJDZYSID;
+ private String DZYSID;
+
+}
+
diff --git a/src/main/java/com/ssf/mysqloracletest/domain/VillageSendRecordStatic.java b/src/main/java/com/ssf/mysqloracletest/domain/VillageSendRecordStatic.java
new file mode 100644
index 0000000..efedc99
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/domain/VillageSendRecordStatic.java
@@ -0,0 +1,30 @@
+package com.ssf.mysqloracletest.domain;
+
+import lombok.Data;
+
+/**
+ * village_send_vehicle_record
+ * 形体抓拍转发记录表
+ */
+@Data
+public class VillageSendRecordStatic {
+ private String id;
+ private String villageCode;
+ private String villageName;
+ private String deviceCode;
+ private String tableName;
+ private String tableId;
+ private String sendTime;
+ private String receiveTime;
+ private String manufactorNo;
+ private String receiptId;
+ private String resultStatus;
+ private String resultRemark;
+ private String isactive;
+ private String c1;
+ private String c2;
+ private String c3;
+ private String c4;
+ private String c5;
+
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/domain/VillageUserInfo.java b/src/main/java/com/ssf/mysqloracletest/domain/VillageUserInfo.java
new file mode 100644
index 0000000..14811af
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/domain/VillageUserInfo.java
@@ -0,0 +1,397 @@
+package com.ssf.mysqloracletest.domain;
+
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 住户信息对象 village_user_info
+ *
+ * @author ruoyi
+ */
+@Data
+public class VillageUserInfo {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private Long id;
+
+ /**
+ * 小区编码
+ */
+ private String villageCode;
+
+ /**
+ * 小区名称
+ */
+ //@Excel(name = "小区名称*")
+ private String villageName;
+ /**
+ * 网格名称
+ */
+ //@Excel(name = "网格名称*")
+ private String gridName;
+ /**
+ * 楼栋名称
+ */
+ //@Excel(name = "楼栋名称*")
+ private String buildingName;
+ /**
+ * 单元名称
+ */
+ //@Excel(name = "单元名称*")
+ private String unitName;
+ /**
+ * 房屋名称
+ */
+ //@Excel(name = "房屋名称*")
+ private String homeName;
+
+ /**
+ * 人员姓名
+ */
+ //@Excel(name = "住户姓名*")
+ private String userName;
+ /**
+ * 人员类型
+ */
+ //@Excel(name = "人员类型*", comboWt = "person_type")
+ private String personTypeCn;
+ /**
+ * 证件类型
+ */
+ //@Excel(name = "证件类型", comboWt = "identity_type")
+ private String identityTypeCn;
+ /**
+ * 证件号码
+ */
+ //@Excel(name = "证件号码*")
+ private String idcard;
+ /**
+ * 人员类别
+ */
+ //@Excel(name = "人员类别*", comboWt = "person_category")
+ private String personCategoryCn;
+
+ /**
+ * 联系电话
+ */
+ //@Excel(name = "联系电话")
+ private String phone;
+ /**
+ * 出生日期
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ //@Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date birthday;
+ /**
+ * 关爱人员标签
+ */
+ //@Excel(name = "关爱人员标签", comboWt = "caring_label")
+ private String caringLabelCn;
+ /**
+ * 是否户主
+ */
+ //@Excel(name = "是否户主*", comboWt = "is_householder")
+ private String isHouseholderCn;
+ /**
+ * 与户主关系
+ */
+ //@Excel(name = "与户主关系*", comboWt = "householder_relation")
+ private String householderRelationCn;
+ /**
+ * 性别
+ */
+ //@Excel(name = "性别", comboWt = "sex")
+ private String sexCn;
+ //@Excel(name = "民族", comboWt = "nation")
+ private String nationCn;
+ /**
+ * 国籍
+ */
+ //@Excel(name = "国籍", comboWt = "nationality")
+ private String nationalityCn;
+
+ /**
+ * 籍贯
+ */
+ //@Excel(name = "籍贯" )
+ private String nativeplace;
+ /**
+ * 学历
+ */
+ //@Excel(name = "学历", comboWt = "education")
+ private String educationCn;
+ /**
+ * 政治面貌
+ */
+ //@Excel(name = "政治面貌", comboWt = "political_outlook")
+ private String politicalOutlookCn;
+
+ /**
+ * 户籍
+ */
+ //@Excel(name = "户籍")
+ private String houseHoldRegister;
+
+ /**
+ * 户籍地址
+ */
+ //@Excel(name = "户籍地址")
+ private String houseHoldAddress;
+
+ /**
+ * 宗教信仰
+ */
+ //@Excel(name = "宗教信仰")
+ private String religious;
+
+
+ /**
+ * 网格编码
+ */
+ private String gridCode;
+
+ /**
+ * 楼栋编号
+ */
+ private String buildingCode;
+
+
+ /**
+ * 单元编码
+ */
+ private String unitCode;
+
+
+ /**
+ * 房屋编码
+ */
+ private String homeCode;
+
+ /**
+ * 人员照片
+ */
+ private String userPic;
+
+ /**
+ * 常口库标准照片
+ */
+ private String userStandardPic;
+ //标准图片是空参数
+ private String userStandardPicIsNull;
+
+ /**
+ * 证件类型
+ */
+ private Integer identityType;
+
+
+ private String idcardCn;
+
+ /**
+ * 性别
+ */
+ private Integer sex;
+
+
+ /**
+ * 民族
+ */
+ private Integer nation;
+
+ /**
+ * 公司名称
+ */
+// //@Excel(name = "公司名称")
+ private String company;
+
+ private String phoneCn;
+
+ /**
+ * 国籍
+ */
+ private Integer nationality;
+
+
+ /**
+ * 学历
+ */
+ private Integer education;
+
+
+ /**
+ * 现居行政区编码
+ */
+// //@Excel(name = "现居行政区编码")
+ private String areaCode;
+
+ /**
+ * 现居行政区名称
+ */
+// //@Excel(name = "现居行政区名称")
+ private String areaName;
+
+ /**
+ * 实际居住地
+ */
+// //@Excel(name = "实际居住地")
+ private String habitation;
+
+
+ /**
+ * 政治面貌
+ */
+ private Integer politicalOutlook;
+
+
+ /**
+ * 入境时间
+ */
+// //@Excel(name = "入境时间")
+ private Long entryTime;
+
+ /**
+ * 婚姻状况
+ */
+ private Integer marriage;
+ /**
+ * 婚姻状况
+ */
+// //@Excel(name = "婚姻状况", comboWt = "marriage")
+ private String marriageCn;
+
+ /**
+ * 人员类型
+ */
+ private Integer personType;
+
+
+ /**
+ * 人员类别
+ */
+ private Integer personCategory;
+
+
+ /**
+ * 关爱人员标签
+ */
+ private Integer caringLabel;
+
+
+ /**
+ * 是否户主
+ */
+ private Integer isHouseholder;
+
+
+ /**
+ * 与户主关系
+ */
+ private Integer householderRelation;
+
+ /**
+ * 是否接种疫苗
+ */
+ private Integer isVaccinate;
+ /**
+ * 是否接种疫苗
+ */
+ private String isVaccinateCn;
+
+ /**
+ * 是否接种第一针疫苗
+ */
+ private Integer isFirstVaccinate;
+ /**
+ * 是否接种第一针疫苗
+ */
+ private String isFirstVaccinateCn;
+
+ /**
+ * 是否接种第二针疫苗
+ */
+ private Integer isSecondVaccinate;
+ /**
+ * 是否接种第二针疫苗
+ */
+ private String isSecondVaccinateCn;
+
+ /**
+ * 是否接种第三针疫苗
+ */
+ private Integer isThirdVaccinate;
+ /**
+ * 是否接种第三针疫苗
+ */
+ private String isThirdVaccinateCn;
+
+ private String createtime;
+ private String createby;
+ private String updatetime;
+ private String updateby;
+ /**
+ * 0:不活跃,1:活跃
+ */
+ private Integer isactive;
+
+ /**
+ * 扩展字段c1
+ */
+ private String c1;
+ private String c1Cn;
+ //更新version字段
+ private String c2New;
+
+ /**
+ * 扩展字段c2
+ */
+ private String c2;
+
+ /**
+ * 扩展字段c3
+ */
+ private String c3;
+
+ /**
+ * 扩展字段c4
+ */
+ private String c4;
+
+ /**
+ * 扩展字段c5
+ */
+ private String c5;
+
+ private String idsIn;
+
+ private String idcardDesensitization;
+
+ private String phoneDesensitization;
+ //重点人类型
+ private String impUserType;
+ //多个重点人类型标签
+ private JSONObject impUserTypes;
+ private String impUserTypeCn;
+
+ private String imsi;
+
+ private Boolean isExport;
+ //人员全息 规则 排序字段: 有图且打好标记的最优先展示
+ private String orderByTomany;
+ /**
+ * 可信度
+ */
+ private String reliability;
+
+ //是否重点人
+ private String isImpUser;
+
+ //是否全息档案请求
+ private String enabledArchives;
+
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/mapper/VSySydzMysqlMapper.java b/src/main/java/com/ssf/mysqloracletest/mapper/VSySydzMysqlMapper.java
new file mode 100644
index 0000000..9095e83
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/mapper/VSySydzMysqlMapper.java
@@ -0,0 +1,15 @@
+package com.ssf.mysqloracletest.mapper;
+
+
+import com.ssf.mysqloracletest.domain.VSySydzMysql;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VSySydzMysqlMapper {
+
+ public VSySydzMysql selectVSySydzById(String id);
+
+ public int insertVSySydz(VSySydzMysql bean);
+
+ public int updateVSySydzById(VSySydzMysql bean);
+}
\ No newline at end of file
diff --git a/src/main/java/com/ssf/mysqloracletest/mapper/VSySydzOracleMapper.java b/src/main/java/com/ssf/mysqloracletest/mapper/VSySydzOracleMapper.java
new file mode 100644
index 0000000..ddeb1cf
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/mapper/VSySydzOracleMapper.java
@@ -0,0 +1,16 @@
+package com.ssf.mysqloracletest.mapper;
+
+
+import com.ssf.mysqloracletest.domain.VSySydzOracle;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface VSySydzOracleMapper {
+ public int countSydz();
+
+ public List getSydzList(Map map);
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/ssf/mysqloracletest/mapper/VillageSendRecordStaticMapper.java b/src/main/java/com/ssf/mysqloracletest/mapper/VillageSendRecordStaticMapper.java
new file mode 100644
index 0000000..09a0c6d
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/mapper/VillageSendRecordStaticMapper.java
@@ -0,0 +1,48 @@
+package com.ssf.mysqloracletest.mapper;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.ssf.mysqloracletest.domain.VillageSendRecordStatic;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+@DS("mysql")
+public interface VillageSendRecordStaticMapper {
+ /**
+ * 插入一条记录
+ *
+ * @return
+ */
+ int insertRecord(VillageSendRecordStatic villageSendRecordStatic);
+
+ /**
+ * 批量插入
+ *
+ * @return
+ */
+ int insertRecords(List villageSendRecordStatic);
+
+ /**
+ * 单条更新
+ *
+ * @return
+ */
+ int updateRecord(VillageSendRecordStatic villageSendRecordStatic);
+
+ int updateRecordByTableId(VillageSendRecordStatic villageSendRecordStatic);
+
+ /**
+ * 查询车辆转发记录表中指定厂家,小区,表,设备,最大的一条已转发记录
+ *
+ * @param map
+ * @return
+ */
+ Long getMaxTableIdFromVillageSendRecordStatic(Map map);
+
+ /**
+ *
+ */
+ public List getList(Map map);
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/mapper/VillageUserInfoMapper.java b/src/main/java/com/ssf/mysqloracletest/mapper/VillageUserInfoMapper.java
new file mode 100644
index 0000000..1b88202
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/mapper/VillageUserInfoMapper.java
@@ -0,0 +1,93 @@
+package com.ssf.mysqloracletest.mapper;
+
+import com.ssf.mysqloracletest.domain.VillageUserInfo;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 住户信息Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-05-17
+ */
+public interface VillageUserInfoMapper {
+ /**
+ * 查询住户信息
+ *
+ * @param id 住户信息主键
+ * @return 住户信息
+ */
+ public VillageUserInfo selectVillageUserInfoById(Long id);
+
+ public VillageUserInfo selectVillageUserInfoByIdcard(String id);
+
+ /**
+ * 查询住户信息列表
+ *
+ * @param villageUserInfo 住户信息
+ * @return 住户信息集合
+ */
+ public List selectVillageUserInfoList(VillageUserInfo villageUserInfo);
+
+ /**
+ * 查询住户信息列表
+ *
+ * @param villageUserInfo 住户信息
+ * @return 住户信息集合
+ */
+ public List archivesList(VillageUserInfo villageUserInfo);
+
+ /**
+ * 新增住户信息
+ *
+ * @param villageUserInfo 住户信息
+ * @return 结果
+ */
+ public int insertVillageUserInfo(VillageUserInfo villageUserInfo);
+
+ public int saveOrUpdate(VillageUserInfo villageUserInfo);
+
+ /**
+ * 修改住户信息
+ *
+ * @param villageUserInfo 住户信息
+ * @return 结果
+ */
+ public int updateVillageUserInfo(VillageUserInfo villageUserInfo);
+
+ public int updateVillageUserInfoByIdcard(VillageUserInfo bean);
+
+ /**
+ * 删除住户信息
+ *
+ * @param id 住户信息主键
+ * @return 结果
+ */
+ public int deleteVillageUserInfoById(Long id);
+
+ public int deleteVillageUserInfoByUpdatetime(VillageUserInfo bean);
+
+ /**
+ * 批量删除住户信息
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteVillageUserInfoByIds(String[] ids);
+
+ /**
+ * 逻辑删除
+ */
+ public int logicDelete(Map map);
+
+ /**
+ * 模型:疑似居住未登记人员功能模块使用
+ */
+ public int deleteVillageUserInfo(Map map);
+
+
+ public List userArchivesTask(VillageUserInfo userInfo);
+
+ public List userArchivesTaskNotIn(VillageUserInfo userInfo);
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/schedule/ScheduleConfig.java b/src/main/java/com/ssf/mysqloracletest/schedule/ScheduleConfig.java
new file mode 100644
index 0000000..7375fae
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/schedule/ScheduleConfig.java
@@ -0,0 +1,18 @@
+package com.ssf.mysqloracletest.schedule;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.SchedulingConfigurer;
+import org.springframework.scheduling.config.ScheduledTaskRegistrar;
+
+import java.util.concurrent.Executors;
+
+@Configuration
+@EnableScheduling
+public class ScheduleConfig implements SchedulingConfigurer {
+
+ @Override
+ public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
+ taskRegistrar.setScheduler(Executors.newScheduledThreadPool(30));
+ }
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/service/VSySydzMysqlService.java b/src/main/java/com/ssf/mysqloracletest/service/VSySydzMysqlService.java
new file mode 100644
index 0000000..8cd471f
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/service/VSySydzMysqlService.java
@@ -0,0 +1,14 @@
+package com.ssf.mysqloracletest.service;
+
+import com.ssf.mysqloracletest.domain.VSySydzMysql;
+
+public interface VSySydzMysqlService {
+
+ public VSySydzMysql selectVSySydzById(String id);
+
+ public int insertVSySydz(VSySydzMysql sydz);
+
+ public int updateVSySydzById(VSySydzMysql sydz);
+
+
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/service/VSySydzOracleService.java b/src/main/java/com/ssf/mysqloracletest/service/VSySydzOracleService.java
new file mode 100644
index 0000000..9f8920e
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/service/VSySydzOracleService.java
@@ -0,0 +1,14 @@
+package com.ssf.mysqloracletest.service;
+
+import com.ssf.mysqloracletest.domain.VSySydzOracle;
+
+import java.util.List;
+import java.util.Map;
+
+public interface VSySydzOracleService {
+
+ public int countSydz();
+
+ public List getSydzList(Map map);
+
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/service/VillageUserInfoService.java b/src/main/java/com/ssf/mysqloracletest/service/VillageUserInfoService.java
new file mode 100644
index 0000000..77913d7
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/service/VillageUserInfoService.java
@@ -0,0 +1,65 @@
+package com.ssf.mysqloracletest.service;
+
+import com.ssf.mysqloracletest.domain.VillageUserInfo;
+
+import java.util.List;
+
+/**
+ * 住户信息Service接口
+ *
+ * @author ruoyi
+ * @date 2022-05-17
+ */
+public interface VillageUserInfoService {
+ /**
+ * 查询住户信息
+ *
+ * @param id 住户信息主键
+ * @return 住户信息
+ */
+ public VillageUserInfo selectVillageUserInfoById(Long id);
+
+ /**
+ * 查询住户信息列表
+ *
+ * @param villageUserInfo 住户信息
+ * @return 住户信息集合
+ */
+ public List selectVillageUserInfoList(VillageUserInfo villageUserInfo);
+
+ public VillageUserInfo selectVillageUserInfoByIdcard(String idcard);
+
+ /**
+ * 新增住户信息
+ *
+ * @param villageUserInfo 住户信息
+ * @return 结果
+ */
+ public int insertVillageUserInfo(VillageUserInfo villageUserInfo);
+
+ /**
+ * 修改住户信息
+ *
+ * @param villageUserInfo 住户信息
+ * @return 结果
+ */
+ public int updateVillageUserInfo(VillageUserInfo villageUserInfo);
+
+ /**
+ * 批量删除住户信息
+ *
+ * @param ids 需要删除的住户信息主键集合
+ * @return 结果
+ */
+
+ public int updateVillageUserInfoByIdcard(VillageUserInfo bean);
+
+ /**
+ * 删除住户信息信息
+ *
+ * @param id 住户信息主键
+ * @return 结果
+ */
+ public int deleteVillageUserInfoById(Long id);
+
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/service/impl/VSySydzMysqlServiceImpl.java b/src/main/java/com/ssf/mysqloracletest/service/impl/VSySydzMysqlServiceImpl.java
new file mode 100644
index 0000000..efd9120
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/service/impl/VSySydzMysqlServiceImpl.java
@@ -0,0 +1,31 @@
+package com.ssf.mysqloracletest.service.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.ssf.mysqloracletest.domain.VSySydzMysql;
+import com.ssf.mysqloracletest.mapper.VSySydzMysqlMapper;
+import com.ssf.mysqloracletest.service.VSySydzMysqlService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+@Service
+@DS("mysql")
+@RequiredArgsConstructor
+public class VSySydzMysqlServiceImpl implements VSySydzMysqlService {
+
+ private final VSySydzMysqlMapper sySydzMysqlMapper;
+
+ @Override
+ public VSySydzMysql selectVSySydzById(String id) {
+ return sySydzMysqlMapper.selectVSySydzById(id);
+ }
+
+ @Override
+ public int insertVSySydz(VSySydzMysql bean) {
+ return sySydzMysqlMapper.insertVSySydz(bean);
+ }
+
+ @Override
+ public int updateVSySydzById(VSySydzMysql bean) {
+ return sySydzMysqlMapper.updateVSySydzById(bean);
+ }
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/service/impl/VSySydzOracleServiceImpl.java b/src/main/java/com/ssf/mysqloracletest/service/impl/VSySydzOracleServiceImpl.java
new file mode 100644
index 0000000..0567149
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/service/impl/VSySydzOracleServiceImpl.java
@@ -0,0 +1,30 @@
+package com.ssf.mysqloracletest.service.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.ssf.mysqloracletest.domain.VSySydzOracle;
+import com.ssf.mysqloracletest.mapper.VSySydzOracleMapper;
+import com.ssf.mysqloracletest.service.VSySydzOracleService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+@Service
+@DS("oracleSydz")
+public class VSySydzOracleServiceImpl implements VSySydzOracleService {
+
+ @Resource
+ private VSySydzOracleMapper oracleMapper;
+
+ @Override
+ public int countSydz() {
+ return oracleMapper.countSydz();
+ }
+
+ @Override
+ public List getSydzList(Map map) {
+ return oracleMapper.getSydzList(map);
+ }
+
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/service/impl/VillageUserInfoServiceImpl.java b/src/main/java/com/ssf/mysqloracletest/service/impl/VillageUserInfoServiceImpl.java
new file mode 100644
index 0000000..fe6be12
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/service/impl/VillageUserInfoServiceImpl.java
@@ -0,0 +1,119 @@
+package com.ssf.mysqloracletest.service.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.ssf.mysqloracletest.domain.VillageUserInfo;
+import com.ssf.mysqloracletest.mapper.VillageUserInfoMapper;
+import com.ssf.mysqloracletest.service.VillageUserInfoService;
+import com.ssf.mysqloracletest.utils.NumKit;
+import com.ssf.mysqloracletest.utils.StringKit;
+import lombok.RequiredArgsConstructor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 住户信息Service业务层处理
+ *
+ * @author ruoyi
+ */
+@Service
+@RequiredArgsConstructor
+@DS("mysql")
+public class VillageUserInfoServiceImpl implements VillageUserInfoService {
+ private static final Logger logger = LoggerFactory.getLogger(VillageUserInfoServiceImpl.class);
+ private final VillageUserInfoMapper villageUserInfoMapper;
+
+ /**
+ * 查询住户信息
+ *
+ * @param id 住户信息主键
+ * @return 住户信息
+ */
+ @Override
+ public VillageUserInfo selectVillageUserInfoById(Long id) {
+ VillageUserInfo v = villageUserInfoMapper.selectVillageUserInfoById(id);
+ return v;
+ }
+
+ /**
+ * 查询住户信息列表
+ *
+ * @param villageUserInfo 住户信息
+ * @return 住户信息
+ */
+ @Override
+ public List selectVillageUserInfoList(VillageUserInfo villageUserInfo) {
+ //查询之前加密
+ List list = villageUserInfoMapper.selectVillageUserInfoList(villageUserInfo);
+ return list;
+ }
+
+
+ /**
+ * 新增住户信息
+ *
+ * @param villageUserInfo 住户信息
+ * @return 结果
+ */
+ @Override
+ public int insertVillageUserInfo(VillageUserInfo villageUserInfo) {
+ try {
+ return villageUserInfoMapper.insertVillageUserInfo(villageUserInfo);
+ } catch (Exception e) {
+ logger.info(StringKit.getTrace(e));
+ return 0;
+ }
+ }
+
+
+ /**
+ * 修改住户信息
+ *
+ * @param villageUserInfo 住户信息
+ * @return 结果
+ */
+ @Override
+ public int updateVillageUserInfo(VillageUserInfo villageUserInfo) {
+ try {
+ return villageUserInfoMapper.updateVillageUserInfo(villageUserInfo);
+ } catch (Exception e) {
+ logger.info(StringKit.getTrace(e));
+ return 0;
+ }
+ }
+
+ @Override
+ public VillageUserInfo selectVillageUserInfoByIdcard(String idcard) {
+ VillageUserInfo v = villageUserInfoMapper.selectVillageUserInfoByIdcard(idcard);
+ return v;
+ }
+
+
+ @Override
+ public int updateVillageUserInfoByIdcard(VillageUserInfo bean) {
+ VillageUserInfo beanCheck = selectVillageUserInfoByIdcard(bean.getIdcard());
+ String versionCheck = StringKit.toString(beanCheck.getC2());
+ String c2 = "".equals(bean.getC2()) ? "1" : bean.getC2();
+ int version = NumKit.checkInt(c2);
+ bean.setC2(StringKit.toString(version));
+ bean.setC2New(StringKit.toString(version + 1));
+ if ("".equals(versionCheck) || c2.equals(versionCheck)) {
+ return villageUserInfoMapper.updateVillageUserInfoByIdcard(bean);
+ }
+ return 0;
+ }
+
+
+ /**
+ * 删除住户信息信息
+ *
+ */
+ @Override
+ public int deleteVillageUserInfoById(Long id) {
+ return villageUserInfoMapper.deleteVillageUserInfoById(id);
+ }
+
+
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/task/VSySydzTask.java b/src/main/java/com/ssf/mysqloracletest/task/VSySydzTask.java
new file mode 100644
index 0000000..424e390
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/task/VSySydzTask.java
@@ -0,0 +1,114 @@
+package com.ssf.mysqloracletest.task;
+
+import com.ssf.mysqloracletest.domain.VSySydzMysql;
+import com.ssf.mysqloracletest.domain.VSySydzOracle;
+import com.ssf.mysqloracletest.service.VSySydzMysqlService;
+import com.ssf.mysqloracletest.service.VSySydzOracleService;
+import com.ssf.mysqloracletest.utils.ConfigParam;
+import com.ssf.mysqloracletest.utils.NumKit;
+import com.ssf.mysqloracletest.utils.StringKit;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+/**
+ * 灌云 用户数据接入
+ */
+@Component
+public class VSySydzTask {
+
+ private static final Logger logger = LoggerFactory.getLogger(VSySydzTask.class);
+
+ @Resource
+ private VSySydzMysqlService sydzMysqlService;
+
+ @Resource
+ private VSySydzOracleService sydzOracleService;
+
+ final int oncesCounts = NumKit.checkInt(ConfigParam.oncesCounts) == 0 ? 1000 : NumKit.checkInt(ConfigParam.oncesCounts);
+
+ private boolean sydzTag = false;
+
+ /**
+ * 连云港 对接海康平台获取人员基础数据
+ * //
+ */
+ @Scheduled(initialDelay = 100, fixedDelay = 3000)
+ public void transSydz() {
+
+ if (sydzTag) {
+ return;
+ }
+
+ if (!"true".equals(ConfigParam.sydzSwitch)) {
+ return;
+ }
+
+
+ try {
+ int countSydz = sydzOracleService.countSydz();
+ logger.info("countSydz:" + countSydz);
+
+ if (countSydz > 0) {
+
+ sydzTag = true;
+
+ int count = countSydz / oncesCounts;
+ CountDownLatch latch = new CountDownLatch(count);
+ ExecutorService sydzPool = Executors.newFixedThreadPool(50);
+
+ for (int i = 0; i <= count; i++) {
+ Map sydzMap = new HashMap();
+ sydzMap.put("rowStart", i * oncesCounts);
+ sydzMap.put("rowEnd", (i + 1) * oncesCounts);
+ sydzPool.submit(() -> {
+ try {
+ List sydzs = sydzOracleService.getSydzList(sydzMap);
+ for (VSySydzOracle sydz : sydzs) {
+ VSySydzMysql sBean = new VSySydzMysql();
+ BeanUtils.copyProperties(sydz, sBean);
+ //确定一个数据是否唯一
+ VSySydzMysql checkSydz = sydzMysqlService.selectVSySydzById(sydz.getDZDXMC());
+ if (checkSydz == null) {
+ sydzMysqlService.insertVSySydz(sBean);
+ logger.info("sydz-" + sydz.getDZDXMC() + ":插入成功");
+ } else {
+ sydzMysqlService.updateVSySydzById(sBean);
+ logger.info("sydz-" + sydz.getSJDZYSID() + ":更新成功");
+ }
+ }
+ } catch (Exception e) {
+ logger.info("sydzs:" + e.getMessage());
+ }
+ latch.countDown();
+ });
+ logger.info("sydzMap数据总量:" + countSydz + "," + "当前处理下标:" + sydzMap.get("rowStart") + "/" + sydzMap.get("rowEnd"));
+ }
+
+ try {
+ // Wait for all threads to complete
+ latch.await();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ // 关闭线程池
+ sydzPool.shutdown();
+ }
+
+ } catch (Exception e) {
+ logger.info(StringKit.getTrace(e));
+ }
+ }
+
+
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/utils/ConfigParam.java b/src/main/java/com/ssf/mysqloracletest/utils/ConfigParam.java
new file mode 100644
index 0000000..4710305
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/utils/ConfigParam.java
@@ -0,0 +1,13 @@
+package com.ssf.mysqloracletest.utils;
+
+import org.springframework.stereotype.Component;
+
+import java.io.File;
+
+@Component
+public class ConfigParam {
+
+ public static String seq = File.separator;
+ public static String sydzSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("sydzSwitch"));
+ public static String oncesCounts = StringKit.toString(PropertiesUtil.queryPropertiesByKey("oncesCounts"));
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/utils/NumKit.java b/src/main/java/com/ssf/mysqloracletest/utils/NumKit.java
new file mode 100644
index 0000000..14a171f
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/utils/NumKit.java
@@ -0,0 +1,51 @@
+package com.ssf.mysqloracletest.utils;
+
+import java.math.BigDecimal;
+
+public class NumKit {
+
+ public NumKit() {
+ }
+
+
+ public static Double checkDouble(String num) {
+ try {
+ Double i = Double.valueOf(num);
+ return i;
+ } catch (Exception var3) {
+ }
+
+ return 0D;
+ }
+
+ public static Integer checkInt(String num) {
+ try {
+ Integer i = Integer.valueOf(num);
+ return i;
+ } catch (Exception var3) {
+ }
+ return 0;
+ }
+
+ public static Long checkLong(String num) {
+ try {
+ Long i = Long.valueOf(num);
+ return i;
+ } catch (Exception var3) {
+ }
+ return 0L;
+ }
+
+ public static BigDecimal checkBigDecimal(String num) {
+ try {
+ BigDecimal bd = new BigDecimal(num);
+ return bd;
+ } catch (Exception var3) {
+ }
+ return null;
+ }
+
+
+
+
+}
diff --git a/src/main/java/com/ssf/mysqloracletest/utils/OrderedProperties.java b/src/main/java/com/ssf/mysqloracletest/utils/OrderedProperties.java
new file mode 100644
index 0000000..ff68b29
--- /dev/null
+++ b/src/main/java/com/ssf/mysqloracletest/utils/OrderedProperties.java
@@ -0,0 +1,43 @@
+package com.ssf.mysqloracletest.utils;
+
+import java.util.*;
+
+/**
+ * OrderedProperties
+ *
+ * @author Unmi
+ * @date 2012-12-07
+ */
+public class OrderedProperties extends Properties {
+
+ private static final long serialVersionUID = -4627607243846121965L;
+
+ private final LinkedHashSet