diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..269c122
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.gitignore b/.gitignore
index 09bdfea..b58d38f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,9 +13,7 @@ target/
### STS ###
.apt_generated
-.classpath
.factorypath
-.project
.settings
.springBeans
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 0000000..01e6799
Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 0000000..7179346
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
diff --git a/.project b/.project
new file mode 100644
index 0000000..df6375e
--- /dev/null
+++ b/.project
@@ -0,0 +1,23 @@
+
+
+ blueland-plateform
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..8f3be38
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
+### 工程模块说明 ###
+1. model:实例类
+2. core:核心类,其他工程共享
+3. web: 应用、模块、模型、自定义表单数据服务
+4. render:静态页面渲染、物理表模型及数据处理
\ No newline at end of file
diff --git a/mvnw b/mvnw
new file mode 100644
index 0000000..5551fde
--- /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
+#
+# http://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..e5cfb0a
--- /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 http://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..985143b
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,101 @@
+
+
+ 4.0.0
+ com.blueland
+ blueland-plateform
+ 1.0-SNAPSHOT
+ blueland-plateform
+ 快速开发平台
+
+
+ 1.8
+ 2.5.6
+
+
+ 2.0.0
+ 1.1.21
+ 5.4.2.Final
+ 1.2.56
+ UTF-8
+ 5.1.10
+
+ 2.3.5.RELEASE
+ 2.1.3.RELEASE
+ 3.8.0
+ 2.5.0
+ 3.3.2
+
+ 3.2
+ 27.1-jre
+
+ 2.9.7
+ 3.6.0
+ 1.2
+
+ 4.1.0
+ 4.1.0
+ 4.1.0
+ 3.4.3.4
+ 2.9.2
+ 3.0.3
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-dependencies
+ ${spring.boot.version}
+ pom
+ import
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ ${mybatis-plus.version}
+
+
+ com.baomidou
+ mybatis-plus-extension
+ ${mybatis-plus.version}
+
+
+
+
+ pom
+
+ usm-web
+ usm-model
+ usm-core
+ usm-render
+
+
+
+
+ public
+ aliyun nexus
+ https://maven.aliyun.com/repository/public/
+
+ true
+
+
+
+
+
+
+ public
+ aliyun nexus
+ https://maven.aliyun.com/repository/public/
+
+ true
+
+
+ false
+
+
+
+
\ No newline at end of file
diff --git a/usm-core/.checkstyle b/usm-core/.checkstyle
new file mode 100644
index 0000000..5783bc0
--- /dev/null
+++ b/usm-core/.checkstyle
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/usm-core/.classpath b/usm-core/.classpath
new file mode 100644
index 0000000..e33daad
--- /dev/null
+++ b/usm-core/.classpath
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/usm-core/.gitignore b/usm-core/.gitignore
new file mode 100644
index 0000000..4295891
--- /dev/null
+++ b/usm-core/.gitignore
@@ -0,0 +1,25 @@
+### Java template
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+target/
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
diff --git a/usm-core/.project b/usm-core/.project
new file mode 100644
index 0000000..d90c796
--- /dev/null
+++ b/usm-core/.project
@@ -0,0 +1,35 @@
+
+
+ blueland-plateform-core
+
+
+
+
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+ com.genuitec.eclipse.springframework.springbuilder
+
+
+
+
+
+ com.genuitec.eclipse.springframework.springnature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+ org.eclipse.wst.common.project.facet.core.nature
+
+
diff --git a/usm-core/pom.xml b/usm-core/pom.xml
new file mode 100644
index 0000000..9888013
--- /dev/null
+++ b/usm-core/pom.xml
@@ -0,0 +1,201 @@
+
+
+ 4.0.0
+
+ com.blueland
+ blueland-plateform
+ 1.0-SNAPSHOT
+
+ usm-core
+ usm-core
+ http://maven.apache.org
+
+ UTF-8
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+ 2.5.6
+
+
+ cn.hutool
+ hutool-all
+ 5.7.14
+
+
+ org.projectlombok
+ lombok
+ provided
+
+
+ com.blueland
+ usm-model
+ 1.0-SNAPSHOT
+
+
+
+
+ com.blueland
+ doc-cloud-sdk
+ ${sdk.version}
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+ org.springframework.boot
+ spring-boot-starter-jdbc
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+
+ com.alibaba
+ easyexcel
+ 2.1.4
+
+
+
+
+
+
+
+ com.alibaba
+ druid-spring-boot-starter
+ ${druid.version}
+
+
+
+
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-freemarker
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+
+
+ mysql
+ mysql-connector-java
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ com.alibaba
+ fastjson
+ ${fastjson.version}
+
+
+
+
+
+
+
+
+
+
+
+
+ com.github.xiaoymin
+ knife4j-spring-boot-starter
+ ${knife4j.version}
+
+
+ org.springframework.boot
+ spring-boot-devtools
+ true
+
+
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ ognl
+ ognl
+ ${ognl.version}
+
+
+ com.google.guava
+ guava
+ ${guava.version}
+
+
+
+
+
+
+ com.squareup.okhttp3
+ okhttp
+ ${okhttp.version}
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-quartz
+
+
+
+ org.apache.shardingsphere
+ sharding-jdbc-spring-boot-starter
+ 4.0.0-RC1
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+
+
+ com.baomidou
+ mybatis-plus-extension
+
+
+
+
+
+ maven-compiler-plugin
+
+ 1.8
+ 1.8
+
+
+
+
+
diff --git a/usm-core/src/main/java/com/blueland/annotation/ApiVersion.java b/usm-core/src/main/java/com/blueland/annotation/ApiVersion.java
new file mode 100644
index 0000000..db66c2d
--- /dev/null
+++ b/usm-core/src/main/java/com/blueland/annotation/ApiVersion.java
@@ -0,0 +1,22 @@
+package com.blueland.annotation;
+
+
+import com.blueland.enums.Version;
+
+import java.lang.annotation.*;
+
+/**
+ * @program: crm
+ * @description:
+ * @author: bigtian
+ * @create: 2022-01-02 10:17
+ */
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE, ElementType.METHOD})
+@Documented
+public @interface ApiVersion {
+
+ Version[] groups();
+
+}
diff --git a/usm-core/src/main/java/com/blueland/annotation/Log.java b/usm-core/src/main/java/com/blueland/annotation/Log.java
new file mode 100644
index 0000000..a8b2d9b
--- /dev/null
+++ b/usm-core/src/main/java/com/blueland/annotation/Log.java
@@ -0,0 +1,49 @@
+package com.blueland.annotation;
+
+import com.blueland.constant.CommonConstant;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @program: usm
+ * @description: 日志记录
+ * 支持获取path参数,以及@RequestBody参数,
+ * 如果是@RequestBody参数,则放置在第一个参数位
+ * @author: bigtian
+ * @create: 2021-12-30 10:04
+ */
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Log {
+ /**
+ * 租户
+ *
+ * @return
+ */
+// String appId() default "sys";
+
+ /**
+ * 日志类型
+ */
+ CommonConstant.LogType logType() default CommonConstant.LogType.OPERATE;
+
+ /**
+ * 业务类型
+ */
+ String busiType() default "日志记录";
+
+ /**
+ * 操作类型
+ */
+ String opType() default "";
+
+ /**
+ * 系统类型 web app render job export
+ */
+ String type() default "";
+
+
+}
diff --git a/usm-core/src/main/java/com/blueland/aop/LogAspect.java b/usm-core/src/main/java/com/blueland/aop/LogAspect.java
new file mode 100644
index 0000000..56c2317
--- /dev/null
+++ b/usm-core/src/main/java/com/blueland/aop/LogAspect.java
@@ -0,0 +1,199 @@
+package com.blueland.aop;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
+import com.blueland.annotation.Log;
+import com.blueland.constant.CommonConstant;
+import com.blueland.core.util.AccessUtil;
+import com.blueland.core.util.StringUtil;
+import com.blueland.core.util.UserUtils;
+import com.blueland.bo.SysOplogEntity;
+import com.blueland.bo.SysPvlogEntity;
+import com.blueland.model.TPfSysOplog;
+import com.blueland.model.TPfSysPvlog;
+import com.blueland.service.impl.SysOplogServiceImpl;
+import com.blueland.service.impl.SysPvlogServiceImpl;
+import lombok.extern.slf4j.Slf4j;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.AfterReturning;
+import org.aspectj.lang.annotation.AfterThrowing;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.Method;
+import java.util.Date;
+
+/**
+ * @description: 日志记录
+ * @author: bigTian
+ * @create: 2021-10-28 14:48
+ */
+@Aspect
+@Component
+@Slf4j
+public class LogAspect {
+ private final String expCheckPoint = "@annotation(com.blueland.annotation.Log)";
+ private final static String prefix = "执行方法:";
+
+ @Autowired
+ private SysOplogServiceImpl sysOplogService;
+
+ @Autowired
+ private SysPvlogServiceImpl sysPvlogService;
+
+ /**
+ * 配置切点
+ */
+ @Pointcut(expCheckPoint)
+ public void expCheckPoint() {
+ }
+
+
+ /**
+ * 抛出异常后
+ *
+ * @param point
+ * @param ex
+ */
+ @AfterThrowing(pointcut = "expCheckPoint()", throwing = "ex")
+ public void doAfterThrowing(JoinPoint point, Exception ex) throws Exception {
+ log(point, false);
+ }
+
+ private void log(JoinPoint point, boolean isSuccess) throws Exception {
+ MethodSignature signature = (MethodSignature) point.getSignature();
+ Method currentMhd = signature.getMethod();
+ String currentMethodName = point.getTarget().getClass().getSimpleName() + "." + currentMhd.getName();
+ Log logs = currentMhd.getAnnotation(Log.class);
+ String code = logs.logType().getCode();
+ //操作日志
+ if (CommonConstant.LogType.OPERATE.getCode().equals(code)) {
+ operate(point, isSuccess, logs, currentMethodName);
+ } else if (CommonConstant.LogType.PAGEVIEW.getCode().equals(code)) {
+ // 浏览日志
+ pageView(point, logs, currentMethodName);
+ }
+ }
+
+ private void pageView(JoinPoint point, Log logs, String currentMtdName) throws Exception {
+ HttpServletRequest request = UserUtils.getRequest();
+ String aceessIp = AccessUtil.getAccessIp(request);
+ String aceessUrl = AccessUtil.getAccessUrl(request);
+ String aceessSource = AccessUtil.getAccessSource(request);
+ String aceessDevice = AccessUtil.getAccessDevice(request);
+ String aceessBrowse = AccessUtil.getAccessBrowse(request);
+ //获取请求头的 iv_user
+ String ivUser = UserUtils.getIvUser();
+ TPfSysPvlog pvlog = new TPfSysPvlog();
+ pvlog.setUserId(StringUtil.notEmpty(ivUser) ? ivUser : "unknown");
+ pvlog.setUserName(StringUtil.notEmpty(ivUser) ? ivUser : "unknown");
+ pvlog.setBizId(getBusiId(point, logs));
+ pvlog.setBizType(currentMtdName);
+ pvlog.setAceessTitle(logs.busiType());
+ pvlog.setAceessIp(aceessIp);
+ pvlog.setAceessUrl(aceessUrl);
+ pvlog.setAceessTime(new Date());
+ pvlog.setAceessSource(aceessSource);
+ pvlog.setAceessDevice(aceessDevice);
+ pvlog.setAceessBrowse(aceessBrowse);
+ pvlog.setAppId(ObjectUtil.isNotEmpty(UserUtils.getTenantId())?UserUtils.getTenantId():"sys");
+ pvlog.setRemark(prefix + point.getSignature().getName());
+ try {
+ sysPvlogService.save(pvlog);
+ }catch (Exception e) {
+ System.out.println(e);
+ }
+ }
+
+
+ /**
+ * 操作日志
+ *
+ * @param point
+ * @param isSuccess
+ * @param logs
+ */
+ private void operate(JoinPoint point, boolean isSuccess, Log logs, String currentMethodName) throws Exception {
+ String ivUser = UserUtils.getIvUser();
+ String type = logs.type();
+ HttpServletRequest request = UserUtils.getRequest();
+ String aceessIp = AccessUtil.getAccessIp(request);
+ String aceessBrowse = AccessUtil.getAccessBrowse(request);
+ TPfSysOplog oplog = new TPfSysOplog();
+ oplog.setAceessIp(aceessIp);
+ oplog.setAceessBrowse(aceessBrowse);
+ oplog.setCreateTime(new Date());
+ oplog.setBizId(getBusiId(point, logs));
+ oplog.setBizType(currentMethodName);
+ String str = JSONUtil.toJsonStr(point.getArgs());
+ if (str.length() > 4000) {
+ str = StrUtil.sub(str, 0, 3900);
+ }
+ oplog.setContent(str);
+ oplog.setStatus(isSuccess ? CommonConstant.RESULT_SUCCESS : CommonConstant.RESULT_FAILED);
+ oplog.setType(type);
+ oplog.setUserId(StringUtil.notEmpty(ivUser) ? ivUser : "unknown");
+ oplog.setUserName(StringUtil.notEmpty(ivUser) ? ivUser : "unknown");
+ oplog.setRemark(prefix + point.getSignature().getName());
+ oplog.setAppId(ObjectUtil.isNotEmpty(UserUtils.getTenantId())?UserUtils.getTenantId():"sys");
+ try {
+ sysOplogService.save(oplog);
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ }
+
+ private static String getSysId(Object[] objects) {
+ // 从请求参数中获取租户id
+ if (ObjectUtil.isNotEmpty(objects) && objects.length > 1) {
+ JSONObject jsonObject = JSONUtil.parseObj(objects[1]);
+ if (ObjectUtil.isNotEmpty(jsonObject) && ObjectUtil.isNotEmpty(jsonObject.get("appId"))) {
+ return jsonObject.get("appId").toString();
+ } else {
+ return "sys";
+ }
+ }
+ return "sys";
+ }
+
+ /**
+ * 正常执行
+ *
+ * @param point
+ */
+ @AfterReturning("expCheckPoint()")
+ public void successLog(JoinPoint point) throws Exception {
+ log(point, true);
+ }
+
+ /**
+ * 获取BusiId
+ *
+ * @param point
+ * @param logs
+ * @return
+ * @throws Exception
+ */
+ public String getBusiId(JoinPoint point, Log logs) throws Exception {
+ Object[] args = point.getArgs();
+ String busiId = "";
+ if(ObjectUtil.isNotEmpty(args)) {
+ if (args.length > 1) {
+ busiId = JSONUtil.toJsonStr(args[1]);
+ } else {
+ busiId = JSONUtil.toJsonStr(args[0]);
+ }
+ if (busiId.length() > 400) {
+ busiId = StrUtil.sub(busiId, 0, 399);
+ }
+ }
+ return busiId;
+ }
+
+}
diff --git a/usm-core/src/main/java/com/blueland/config/Default2PreciseShardingAlgorithm.java b/usm-core/src/main/java/com/blueland/config/Default2PreciseShardingAlgorithm.java
new file mode 100644
index 0000000..02ce6f9
--- /dev/null
+++ b/usm-core/src/main/java/com/blueland/config/Default2PreciseShardingAlgorithm.java
@@ -0,0 +1,34 @@
+package com.blueland.config;
+
+import cn.hutool.core.date.DateUtil;
+import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm;
+import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue;
+
+import java.util.Collection;
+import java.util.Date;
+
+/**
+ * @author leijie.gao
+ * @since 2020-05-27
+ */
+public class Default2PreciseShardingAlgorithm implements PreciseShardingAlgorithm {
+
+ /**
+ * @param targetTableNames sharding 逻辑表 分表规则
+ * @param shardingVal PreciseShardingValue(logicTableName=真实表, columnName=company_id, value=company_id_value)
+ * @return {{@link String}}
+ */
+ @Override
+ public String doSharding(Collection targetTableNames, PreciseShardingValue shardingVal) {
+ /**
+ * tableNames 对应分片库中所有分片表的集合
+ * shardingValue 为分片属性,其中 logicTableName 为逻辑表,columnName 分片健(字段),value 为从 SQL 中解析出的分片健的值
+ */
+ /**
+ * 取模算法,分片健 % 表数量
+ */
+ Integer month = DateUtil.month(new Date()) + 1;
+
+ return "t_pf_sys_pvlog_" + month;
+ }
+}
\ No newline at end of file
diff --git a/usm-core/src/main/java/com/blueland/config/DefaultPreciseShardingAlgorithm.java b/usm-core/src/main/java/com/blueland/config/DefaultPreciseShardingAlgorithm.java
new file mode 100644
index 0000000..cc4cc7f
--- /dev/null
+++ b/usm-core/src/main/java/com/blueland/config/DefaultPreciseShardingAlgorithm.java
@@ -0,0 +1,34 @@
+package com.blueland.config;
+
+import cn.hutool.core.date.DateUtil;
+import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm;
+import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue;
+
+import java.util.Collection;
+import java.util.Date;
+
+/**
+ * @author leijie.gao
+ * @since 2020-05-27
+ */
+public class DefaultPreciseShardingAlgorithm implements PreciseShardingAlgorithm {
+
+ /**
+ * @param targetTableNames sharding 逻辑表 分表规则
+ * @param shardingVal PreciseShardingValue(logicTableName=真实表, columnName=company_id, value=company_id_value)
+ * @return {{@link String}}
+ */
+ @Override
+ public String doSharding(Collection targetTableNames, PreciseShardingValue shardingVal) {
+ /**
+ * tableNames 对应分片库中所有分片表的集合
+ * shardingValue 为分片属性,其中 logicTableName 为逻辑表,columnName 分片健(字段),value 为从 SQL 中解析出的分片健的值
+ */
+ /**
+ * 取模算法,分片健 % 表数量
+ */
+ Integer month = DateUtil.month(new Date()) + 1;
+
+ return "t_pf_sys_oplog_" + month;
+ }
+}
\ No newline at end of file
diff --git a/usm-core/src/main/java/com/blueland/config/RedisConfig.java b/usm-core/src/main/java/com/blueland/config/RedisConfig.java
new file mode 100644
index 0000000..f29bfc1
--- /dev/null
+++ b/usm-core/src/main/java/com/blueland/config/RedisConfig.java
@@ -0,0 +1,108 @@
+package com.blueland.config;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping;
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.cache.annotation.CachingConfigurerSupport;
+import org.springframework.cache.interceptor.KeyGenerator;
+import org.springframework.context.annotation.Bean;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.lang.reflect.Method;
+
+
+@Data
+@Component
+@ConfigurationProperties(prefix = "spring.redis")
+public class RedisConfig extends CachingConfigurerSupport{
+
+ @Resource
+ private LettuceConnectionFactory lettuceConnectionFactory;
+
+ private String host;
+ private int port;
+ private int timeout;
+ private String password;
+ private int maxActive;
+ private int maxWait;
+ private int maxIdle;
+ private int minIdle;
+
+
+ @Bean
+ public KeyGenerator wiselyKeyGenerator(){
+ return new KeyGenerator() {
+ @Override
+ public Object generate(Object target, Method method, Object... params) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(target.getClass().getName());
+ sb.append(method.getName());
+ for (Object obj : params) {
+ sb.append(obj.toString());
+ }
+ return sb.toString();
+ }
+ };
+ }
+
+
+ /**
+ * RedisTemplate配置
+ *
+ * @param lettuceConnectionFactory
+ * @return
+ */
+ @Bean
+ public RedisTemplate redisTemplate(LettuceConnectionFactory lettuceConnectionFactory) {
+ // 设置序列化
+ Jackson2JsonRedisSerializer