commit c47b86edbe8ac1bee5cd516c6e9df5c6cb90c53d
Author: terry.wang <32783747@qq.com>
Date: Thu Nov 13 13:56:50 2025 +0800
init version for new gitea
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..1de596c
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..63574ec
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/git_toolbox_blame.xml b/.idea/git_toolbox_blame.xml
new file mode 100644
index 0000000..7dc1249
--- /dev/null
+++ b/.idea/git_toolbox_blame.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml
new file mode 100644
index 0000000..02b915b
--- /dev/null
+++ b/.idea/git_toolbox_prj.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..09a5204
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..14df5a7
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CSS
+
+
+ Java
+
+
+ Probable bugsCSS
+
+
+ Probable bugsJava
+
+
+
+
+ User defined
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..b41e96a
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ "associatedIndex": 8
+}
+
+
+
+
+
+ {
+ "keyToString": {
+ "Application.ApiController.executor": "Run",
+ "Application.HisInterfaceUtils.executor": "Run",
+ "Application.PayServiceImpl.executor": "Run",
+ "Application.WSUtil.executor": "Run",
+ "Maven.hrsmobile [clean,package].executor": "Run",
+ "RequestMappingsPanelOrder0": "0",
+ "RequestMappingsPanelOrder1": "1",
+ "RequestMappingsPanelWidth0": "75",
+ "RequestMappingsPanelWidth1": "75",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "Spring Boot.HrsApplication.executor": "Run",
+ "WebServerToolWindowFactoryState": "false",
+ "codeReviewSummary": "[]",
+ "git-widget-placeholder": "main",
+ "kotlin-language-version-configured": "true",
+ "last_opened_file_path": "E:/D-2025prj/zhang-tt/kelfy/datamanagerAdd",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "project.structure.last.edited": "模块",
+ "project.structure.proportion": "0.0",
+ "project.structure.side.proportion": "0.2",
+ "settings.editor.selected.configurable": "editor.preferences.fonts.default",
+ "spring.configuration.checksum": "8d1bbda0f41ff6ead632cd557737c937",
+ "vue.rearranger.settings.migration": "true"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1716180153444
+
+
+ 1716180153444
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1717078525098
+
+
+
+ 1717078525099
+
+
+
+ 1717125417455
+
+
+
+ 1717125417455
+
+
+
+ 1717139210024
+
+
+
+ 1717139210024
+
+
+
+ 1717395203827
+
+
+
+ 1717395203827
+
+
+
+ 1717411676149
+
+
+
+ 1717411676149
+
+
+
+ 1717412538865
+
+
+
+ 1717412538865
+
+
+
+ 1717472765993
+
+
+
+ 1717472765993
+
+
+
+ 1729676742601
+
+
+
+ 1729676742602
+
+
+
+ 1731654528104
+
+
+
+ 1731654528104
+
+
+
+ 1732176385607
+
+
+
+ 1732176385607
+
+
+
+ 1741932689866
+
+
+
+ 1741932689866
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HELP.md b/HELP.md
new file mode 100644
index 0000000..c06c1e8
--- /dev/null
+++ b/HELP.md
@@ -0,0 +1,24 @@
+# Getting Started
+
+### Reference Documentation
+
+For further reference, please consider the following sections:
+
+* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
+* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.5.4/maven-plugin/reference/html/)
+* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.5.4/maven-plugin/reference/html/#build-image)
+* [Spring Web](https://docs.spring.io/spring-boot/docs/2.5.4/reference/htmlsingle/#boot-features-developing-web-applications)
+* [MyBatis Framework](https://mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/)
+* [Thymeleaf](https://docs.spring.io/spring-boot/docs/2.5.4/reference/htmlsingle/#boot-features-spring-mvc-template-engines)
+
+### Guides
+
+The following guides illustrate how to use some features concretely:
+
+* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
+* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
+* [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/)
+* [MyBatis Quick Start](https://github.com/mybatis/spring-boot-starter/wiki/Quick-Start)
+* [Accessing data with MySQL](https://spring.io/guides/gs/accessing-data-mysql/)
+* [Handling Form Submission](https://spring.io/guides/gs/handling-form-submission/)
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..737b1e7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,92 @@
+# hrsmobile-dev
+
+
+
+## Getting started
+
+To make it easy for you to get started with GitLab, here's a list of recommended next steps.
+
+Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
+
+## Add your files
+
+- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
+- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
+
+```
+cd existing_repo
+git remote add origin http://192.168.10.240/kelfy/hrsmobile-dev.git
+git branch -M main
+git push -uf origin main
+```
+
+## Integrate with your tools
+
+- [ ] [Set up project integrations](http://192.168.10.240/kelfy/hrsmobile-dev/-/settings/integrations)
+
+## Collaborate with your team
+
+- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
+- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
+- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
+- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
+- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
+
+## Test and Deploy
+
+Use the built-in continuous integration in GitLab.
+
+- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
+- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
+- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
+- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
+- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
+
+***
+
+# Editing this README
+
+When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
+
+## Suggestions for a good README
+Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
+
+## Name
+Choose a self-explaining name for your project.
+
+## Description
+Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
+
+## Badges
+On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
+
+## Visuals
+Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
+
+## Installation
+Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
+
+## Usage
+Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
+
+## Support
+Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
+
+## Roadmap
+If you have ideas for releases in the future, it is a good idea to list them in the README.
+
+## Contributing
+State if you are open to contributions and what your requirements are for accepting them.
+
+For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
+
+You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
+
+## Authors and acknowledgment
+Show your appreciation to those who have contributed to the project.
+
+## License
+For open source projects, say how it is licensed.
+
+## Project status
+If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
diff --git a/hrsmobile.zip b/hrsmobile.zip
new file mode 100644
index 0000000..d160378
Binary files /dev/null and b/hrsmobile.zip differ
diff --git a/mvnw b/mvnw
new file mode 100644
index 0000000..a16b543
--- /dev/null
+++ b/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
new file mode 100644
index 0000000..c8d4337
--- /dev/null
+++ b/mvnw.cmd
@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..eddeeed
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,174 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.5.4
+
+
+ com.saye
+ hrsmobile
+ 0.0.1-SNAPSHOT
+ war
+ hrsmobile
+ hrsmobile
+
+ 1.8
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ log4j-to-slf4j
+ org.apache.logging.log4j
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.aspectj
+ aspectjweaver
+ 1.9.6
+
+
+
+ org.springframework.boot
+ spring-boot-starter-thymeleaf
+
+
+
+ net.sourceforge.nekohtml
+ nekohtml
+ 1.9.21
+
+
+ mysql
+ mysql-connector-java
+ runtime
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+ provided
+
+
+ com.alibaba
+ fastjson
+ 1.2.73
+
+
+
+ org.apache.poi
+ poi
+ 3.14
+
+
+ org.apache.poi
+ poi-ooxml
+ 3.14
+
+
+
+ org.jsoup
+ jsoup
+ 1.13.1
+
+
+
+ javax.servlet
+ javax.servlet-api
+
+
+ dom4j
+ dom4j
+ 1.6.1
+
+
+ jaxen
+ jaxen
+ 1.1.6
+
+
+ xml-apis
+ xml-apis
+ 1.4.01
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-quartz
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+
+ com.github.wxpay
+ wxpay-sdk
+ 0.0.3
+
+
+
+
+
+ cn.hutool
+ hutool-all
+ 5.8.20
+
+
+
+ com.google.guava
+ guava
+ 32.1.2-jre
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+ org.project-lombok
+ lombok
+
+
+
+
+
+ org.mybatis.generator
+ mybatis-generator-maven-plugin
+ 1.3.5
+
+
+ src/main/resources/generatorConfig.xml
+ true
+ true
+
+
+
+
+
+
diff --git a/src/main/java/com/saye/hrs/HrsApplication.java b/src/main/java/com/saye/hrs/HrsApplication.java
new file mode 100644
index 0000000..d90fd57
--- /dev/null
+++ b/src/main/java/com/saye/hrs/HrsApplication.java
@@ -0,0 +1,17 @@
+package com.saye.hrs;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.scheduling.annotation.EnableScheduling;
+@EnableAspectJAutoProxy(proxyTargetClass=true)
+@SpringBootApplication
+@EnableScheduling
+public class HrsApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(HrsApplication.class, args);
+ }
+
+}
diff --git a/src/main/java/com/saye/hrs/ServletInitializer.java b/src/main/java/com/saye/hrs/ServletInitializer.java
new file mode 100644
index 0000000..14953c2
--- /dev/null
+++ b/src/main/java/com/saye/hrs/ServletInitializer.java
@@ -0,0 +1,13 @@
+package com.saye.hrs;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+public class ServletInitializer extends SpringBootServletInitializer {
+
+ @Override
+ protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
+ return application.sources(HrsApplication.class);
+ }
+
+}
diff --git a/src/main/java/com/saye/hrs/WebLog.java b/src/main/java/com/saye/hrs/WebLog.java
new file mode 100644
index 0000000..1383f39
--- /dev/null
+++ b/src/main/java/com/saye/hrs/WebLog.java
@@ -0,0 +1,23 @@
+package com.saye.hrs;
+
+import java.lang.annotation.*;
+
+/**
+ * @author T.W
+ * @site xxx
+ * @date 2021/9/8
+ * @time 下午9:19
+ * @discription
+ **/
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.METHOD})
+@Documented
+public @interface WebLog {
+ /**
+ * 日志描述信息
+ *
+ * @return
+ */
+ String description() default "";
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/saye/hrs/WebLogAspect.java b/src/main/java/com/saye/hrs/WebLogAspect.java
new file mode 100644
index 0000000..46c628b
--- /dev/null
+++ b/src/main/java/com/saye/hrs/WebLogAspect.java
@@ -0,0 +1,127 @@
+package com.saye.hrs;
+
+//import com.google.gson.Gson;
+
+import com.alibaba.fastjson.JSON;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.Method;
+
+/**
+ * @author T.W
+ * @site xxx
+ * @date 2021/9/8
+ * @time 下午9:19
+ * @discription
+ **/
+@Aspect
+@Component
+//@Profile({"dev", "test"})
+public class WebLogAspect {
+
+ private final static Logger logger = LoggerFactory.getLogger(WebLogAspect.class);
+ /** 换行符 */
+ private static final String LINE_SEPARATOR = System.lineSeparator();
+
+ /** 以自定义 @WebLog 注解为切点 */
+ @Pointcut("@annotation(com.saye.hrs.WebLog)")
+ public void webLog() {}
+
+ /**
+ * 在切点之前织入
+ * @param joinPoint
+ * @throws Throwable
+ */
+ @Before("webLog()")
+ public void doBefore(JoinPoint joinPoint) throws Throwable {
+ // 开始打印请求日志
+ ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+ HttpServletRequest request = attributes.getRequest();
+
+ // 获取 @WebLog 注解的描述信息
+ String methodDescription = getAspectLogDescription(joinPoint);
+
+ // 打印请求相关参数
+ logger.info("========================================== Start ==========================================");
+ // 打印请求 url
+ logger.info("URL : {}", request.getRequestURL().toString());
+ // 打印描述信息
+ logger.info("Description : {}", methodDescription);
+ // 打印 Http method
+ logger.info("HTTP Method : {}", request.getMethod());
+ // 打印调用 controller 的全路径以及执行方法
+ logger.info("Class Method : {}.{}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName());
+ // 打印请求的 IP
+ logger.info("IP : {}", request.getRemoteAddr());
+ // 打印请求入参
+ if(methodDescription.equals("loginUserInfo") || methodDescription.equals("quitUserInfo")){
+
+ }else{
+ logger.info("Request Args : {}", JSON.toJSON(joinPoint.getArgs()));
+ }
+ }
+
+ /**
+ * 在切点之后织入
+ * @throws Throwable
+ */
+ @After("webLog()")
+ public void doAfter() throws Throwable {
+ // 接口结束后换行,方便分割查看
+ logger.info("=========================================== End ===========================================" + LINE_SEPARATOR);
+ }
+
+ /**
+ * 环绕
+ * @param proceedingJoinPoint
+ * @return
+ * @throws Throwable
+ */
+ @Around("webLog()")
+ public Object doAround(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
+ long startTime = System.currentTimeMillis();
+ Object result = proceedingJoinPoint.proceed();
+ // 打印出参
+ logger.info("Response Args : {}", JSON.toJSON(result));
+ // 执行耗时
+ logger.info("Time-Consuming : {} ms", System.currentTimeMillis() - startTime);
+ return result;
+ }
+
+
+ /**
+ * 获取切面注解的描述
+ *
+ * @param joinPoint 切点
+ * @return 描述信息
+ * @throws Exception
+ */
+ public String getAspectLogDescription(JoinPoint joinPoint)
+ throws Exception {
+ String targetName = joinPoint.getTarget().getClass().getName();
+ String methodName = joinPoint.getSignature().getName();
+ Object[] arguments = joinPoint.getArgs();
+ Class targetClass = Class.forName(targetName);
+ Method[] methods = targetClass.getMethods();
+ StringBuilder description = new StringBuilder("");
+ for (Method method : methods) {
+ if (method.getName().equals(methodName)) {
+ Class[] clazzs = method.getParameterTypes();
+ if (clazzs.length == arguments.length) {
+ description.append(method.getAnnotation(WebLog.class).description());
+ break;
+ }
+ }
+ }
+ return description.toString();
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/saye/hrs/commons/HttpUtil.java b/src/main/java/com/saye/hrs/commons/HttpUtil.java
new file mode 100644
index 0000000..44d8234
--- /dev/null
+++ b/src/main/java/com/saye/hrs/commons/HttpUtil.java
@@ -0,0 +1,101 @@
+package com.saye.hrs.commons;
+
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @description: http操作工具类
+ * @author zmc
+ */
+public class HttpUtil {
+
+ public static HttpServletRequest getRequest(){
+ return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+ }
+
+ /**
+ * @description: 获取接口的目标域名
+ * @param
+ * @return java.lang.String
+ * @author zmc
+ */
+ public static String getServerName() {
+ return getServerName(getRequest());
+ }
+
+ /**
+ * @description: 获取接口的目标域名
+ * @param request
+ * @return java.lang.String
+ * @author zmc
+ */
+ public static String getServerName(HttpServletRequest request) {
+ //先从attribute取
+ if (request.getAttribute("targetServerNameForOverride") != null){
+ return request.getAttribute("targetServerNameForOverride").toString();
+ }
+ //再从param取
+ String targetServerName = request.getParameter("targetServerNameForOverride");
+ //param没有才用host的值
+ String serverName = StringUtil.isEmpty(targetServerName) ? request.getServerName() : targetServerName;
+ //写到attribute
+ request.setAttribute("targetServerNameForOverride", serverName);
+ return serverName;
+ }
+
+ public static String getScheme() {
+ String scheme = getRequest().getHeader("X-Forwarded-Scheme");
+ return scheme;
+ }
+
+ public static int getServerPort() {
+ int port = getRequest().getServerPort();
+ return port;
+ }
+
+ /**
+ * @description: 获取请求链接的根地址url
+ * @param request
+ * @return java.lang.String
+ * @author zmc
+ */
+ public static String getRequestRootUrl(HttpServletRequest request) {
+ String protocol = request.getScheme();
+ int port = request.getServerPort();
+ String portStr = "";
+ if("http".equals(protocol)) {
+ if (80 != port) {
+ portStr = ":" + port;
+ } else {
+ portStr = "";
+ }
+ }
+ else if("https".equals(protocol)) {
+ if (443 != port) {
+ portStr = ":" + port;
+ } else {
+ portStr = "";
+ }
+ }
+ //http为443端口的,一般是https协议,nginx或Tomcat等配置不是很好导致取得的是http
+ if(443 == port && "http".equals(protocol)) {
+ protocol = "https";
+ }
+
+ //去掉https的443端口,预发、正式上有问题
+ if(443 == port && "https".equals(protocol)) {
+ portStr = "";
+ }
+
+ String requestRootUrl = protocol + "://" + getServerName(request) + portStr;
+ return requestRootUrl;
+ }
+
+
+ public static String getRequestURL() {
+ return getRequest().getRequestURL().toString();
+ }
+
+}
diff --git a/src/main/java/com/saye/hrs/commons/IPUtil.java b/src/main/java/com/saye/hrs/commons/IPUtil.java
new file mode 100644
index 0000000..380e063
--- /dev/null
+++ b/src/main/java/com/saye/hrs/commons/IPUtil.java
@@ -0,0 +1,82 @@
+package com.saye.hrs.commons;
+
+import org.springframework.util.StringUtils;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * @description: IP
+ * @author zmc
+ */
+public class IPUtil {
+
+ /**
+ * @description: 获取ip
+ * @param
+ * @return java.lang.String
+ * @author zmc
+ */
+ public static String getIp() {
+ ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+ HttpServletRequest request = requestAttributes.getRequest();
+ return getIp(request);
+ }
+
+ /**
+ * @description: 获取ip
+ * @param request
+ * @return java.lang.String
+ * @author zmc
+ */
+ public static String getIp(HttpServletRequest request) {
+ if (request == null) {
+ return null;
+ }
+ String ip = request.getHeader("X-Forwarded-For");
+ if (!StringUtils.isEmpty(ip) && !"unknown".equalsIgnoreCase(ip.toLowerCase())) {
+ //多次反向代理后会有多个ip值,第一个ip才是真实ip
+ int index = ip.indexOf(",");
+ if (index != -1) {
+ return ip.substring(0, index);
+ } else {
+ return ip;
+ }
+ }
+ ip = request.getHeader("X-Real-IP");
+ if (!StringUtils.isEmpty(ip) && !"unknown".equalsIgnoreCase(ip.toLowerCase())) {
+ return ip;
+ }
+ return request.getRemoteAddr();
+ }
+
+ /**
+ * @description: 将IP地址的中间两段转星号隐藏处理
+ * @param ip
+ * @return java.lang.String
+ * @author zmc
+ */
+// public static String hideIP(String ip) {
+// if(null == ip) {
+// return null;
+// }
+// List newIPList = new ArrayList<>();
+// String[] ipArr = org.apache.commons.lang3.StringUtils.splitByWholeSeparatorPreserveAllTokens(ip, ".");
+// int i = 0;
+// int len = ipArr.length;
+// for (String str : ipArr) {
+// if(i > 0 && i < len - 1) {
+// str = "*";
+// }
+// newIPList.add(str);
+// i++;
+// }
+// String newIP = newIPList.stream().collect(Collectors.joining("."));
+// return newIP;
+// }
+
+}
diff --git a/src/main/java/com/saye/hrs/commons/JsonUtils.java b/src/main/java/com/saye/hrs/commons/JsonUtils.java
new file mode 100644
index 0000000..55466b5
--- /dev/null
+++ b/src/main/java/com/saye/hrs/commons/JsonUtils.java
@@ -0,0 +1,136 @@
+package com.saye.hrs.commons;
+
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import org.springframework.util.StringUtils;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @description: Json工具类
+ * @author zmc
+ */
+public class JsonUtils {
+ /**
+ * Bean对象转JSON
+ *
+ * @param object
+ * @param dataFormatString
+ * @return
+ */
+ public static String beanToJson(Object object, String dataFormatString) {
+ if (object != null) {
+ if (StringUtils.isEmpty(dataFormatString)) {
+ return JSONObject.toJSONString(object);
+ }
+ return JSON.toJSONStringWithDateFormat(object, dataFormatString);
+ } else {
+ return null;
+ }
+ }
+
+
+ /**
+ * 将json字符串转换成对象
+ *
+ * @param json
+ * @param clazz
+ * @return
+ */
+ public static T jsonToBean(String json, Class clazz) {
+ if (StringUtils.isEmpty(json) || clazz == null) {
+ return null;
+ }
+ return JSON.parseObject(json, clazz);
+ }
+
+ /**
+ * Bean对象转JSON
+ *
+ * @param object
+ * @return
+ */
+ public static String beanToJson(Object object) {
+ if (object != null) {
+ return JSON.toJSONString(object, SerializerFeature.DisableCircularReferenceDetect);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * String转JSON字符串
+ *
+ * @param key
+ * @param value
+ * @return
+ */
+ public static String stringToJsonByFastjson(String key, String value) {
+ if (StringUtils.isEmpty(key) || StringUtils.isEmpty(value)) {
+ return null;
+ }
+ Map map = new HashMap();
+ map.put(key, value);
+ return beanToJson(map, null);
+ }
+
+
+ /**
+ * json字符串转map
+ *
+ * @param json
+ * @return
+ */
+ public static Map jsonToMap(String json) {
+ if (StringUtils.isEmpty(json)) {
+ return null;
+ }
+ return JSON.parseObject(json, Map.class);
+ }
+
+ public static Map jsonToMapStr(String json) {
+ if (StringUtils.isEmpty(json)) {
+ return null;
+ }
+ return JSON.parseObject(json, Map.class);
+ }
+
+ /**
+ * json字符串转list
+ *
+ * @param jsonStr
+ * @return
+ */
+ public static List stringToList(String jsonStr, Class model) {
+ List object = (List) JSONArray.parseArray(jsonStr, model);
+ return object;
+ }
+ public static List stringToList2(String jsonStr, Class model) {
+ List object = (List) JSONArray.parseArray(jsonStr, model);
+ return object;
+ }
+
+ public static List jsonToList(String json, Class clazz) {
+ if (StringUtils.isEmpty(json)) {
+ return null;
+ }
+ return JSONArray.parseArray(json, clazz);
+ }
+
+ /**
+ * json字符串转list
+ *
+ * @param jsonStr
+ * @return
+ */
+ public static List getStringToList(String jsonStr, Class model) {
+ List object = (List) JSONArray.parseArray(jsonStr, model);
+ return object;
+ }
+
+}
diff --git a/src/main/java/com/saye/hrs/commons/StringUtil.java b/src/main/java/com/saye/hrs/commons/StringUtil.java
new file mode 100644
index 0000000..a344a97
--- /dev/null
+++ b/src/main/java/com/saye/hrs/commons/StringUtil.java
@@ -0,0 +1,83 @@
+package com.saye.hrs.commons;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author: Lee CE
+ * @Description:常用的字符串相关的工具类
+ * @Date: 2018/7/12 15:19
+ * @Modified:
+ */
+public final class StringUtil {
+
+ /**
+ * 判断是否是空字符串 null和"" 都返回 true
+ *
+ * @param str 判断的字符串
+ * @return 是否有效
+ */
+ public static boolean isEmpty(String str) {
+ return str == null || str.equals("");
+ }
+
+ /**
+ * 把string array or list用给定的符号symbol连接成一个字符串
+ *
+ * @param list 需要处理的列表
+ * @param symbol 链接的符号
+ * @return 处理后的字符串
+ */
+ public static String joinString(List list, String symbol) {
+ String result = "";
+ if (list != null) {
+ for (Object o : list) {
+ String temp = o.toString();
+ if (temp.trim().length() > 0)
+ result += (temp + symbol);
+ }
+ if (result.length() > 1) {
+ result = result.substring(0, result.length() - 1);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @description: null转空处理
+ * @param obj
+ * @return java.lang.String
+ * @author zmc
+ * @date 2019-06-10 10:47
+ */
+ public static String changeNullToEmpty(Object obj) {
+ if(null == obj) {
+ return "";
+ }
+ return obj.toString();
+ }
+
+ /**
+ * @description: 字符串去左右空格
+ * @param obj
+ * @return java.lang.String
+ * @author zmc
+ * @date 2019-09-10 17:17
+ */
+ public static String trim(Object obj) {
+ String str = changeNullToEmpty(obj);
+ str = str.trim();
+ return str;
+ }
+ public static String checkKeyword(Map map, String keyword) {
+ if (!StringUtil.isEmpty(keyword)){
+ keyword = keyword.trim();
+ if (!keyword.equals("")){
+ map.put("keyword", keyword);
+ return keyword;
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/src/main/java/com/saye/hrs/commons/date/DateDUtil.java b/src/main/java/com/saye/hrs/commons/date/DateDUtil.java
new file mode 100644
index 0000000..6078428
--- /dev/null
+++ b/src/main/java/com/saye/hrs/commons/date/DateDUtil.java
@@ -0,0 +1,329 @@
+package com.saye.hrs.commons.date;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+public class DateDUtil {
+
+
+ public static String yyyy_MM_dd = "yyyy-MM-dd";
+ public static String yyyyMMdd = "yyyyMMdd";
+ public static String yyyyMM = "yyyyMM";
+ public static String yyyy_MM = "yyyy-MM";
+ public static String yyyy_MM_dd_HH_00 = "yyyy-MM-dd HH:00";
+ public static String yyyy_MM_dd_HH_mm = "yyyy-MM-dd HH:mm";
+ public static String yyyy_MM_dd_HH_mm_ss = "yyyy-MM-dd HH:mm:ss";
+ public static String yyyy_MM_dd_HH_mm_ss_SS = "yyyy-MM-dd HH:mm:ss.SS";
+ public static String yyyyMMddHHmm = "yyyyMMddHHmm";
+ public static String yyyyMMddHHmmss = "yyyyMMddHHmmss";
+ public static String yyyyMMddHHmmssSS = "yyyyMMddHHmmssSS";
+ public static String yyMMdd = "yyMMdd";
+ public static String yyyy_MM_dd_00_00 = "yyyy-MM-dd 00:00";
+
+ /**
+ * 将字符串时间改成Date类型
+ * @param format
+ * @param dateStr
+ * @return
+ */
+ public static Date strToDate(String format,String dateStr) {
+
+ Date date = null;
+
+ try {
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
+ date = simpleDateFormat.parse(dateStr);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+
+ return date;
+ }
+
+
+ /**
+ * 将Date时间转成字符串
+ * @param format
+ * @param date
+ * @return
+ */
+ public static String DateToStr(String format,Date date){
+
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
+
+ return simpleDateFormat.format(date);
+ }
+
+
+
+ /**
+ * 获取2个字符日期的天数差
+ * @param p_startDate
+ * @param p_endDate
+ * @return 天数差
+ */
+ public static long getDaysOfTowDiffDate( String p_startDate, String p_endDate ){
+
+ Date l_startDate = DateDUtil.strToDate(DateDUtil.yyyy_MM_dd, p_startDate);
+ Date l_endDate = DateDUtil.strToDate(DateDUtil.yyyy_MM_dd, p_endDate);
+ long l_startTime = l_startDate.getTime();
+ long l_endTime = l_endDate.getTime();
+ long betweenDays = (long) ( ( l_endTime - l_startTime ) / ( 1000 * 60 * 60 * 24 ) );
+ return betweenDays;
+ }
+
+
+ /**
+ * 获取2个字符日期的天数差
+ * @param l_startDate
+ * @param l_endDate
+ * @return 天数差
+ */
+ public static long getDaysOfTowDiffDate( Date l_startDate, Date l_endDate ){
+
+ long l_startTime = l_startDate.getTime();
+ long l_endTime = l_endDate.getTime();
+ long betweenDays = (long) ( ( l_endTime - l_startTime ) / ( 1000 * 60 * 60 * 24 ) );
+ return betweenDays;
+ }
+
+
+ /**
+ * 给出日期添加一段时间后的日期
+ * @param dateStr
+ * @param plus
+ * @return
+ */
+ public static String getPlusDays(String format,String dateStr,long plus){
+
+ Date date = DateDUtil.strToDate(format, dateStr);
+
+ long time = date.getTime()+ plus*24*60*60*1000;
+
+
+ return DateDUtil.DateToStr(format,new Date(time));
+ }
+
+
+ /**
+ * 给出日期添加一段时间后的日期
+ * @param format
+ * @param date
+ * @param plus
+ * @return
+ */
+ public static String getPlusDays(String format,Date date,long plus){
+
+
+ long time = date.getTime()+ plus*24*60*60*1000;
+
+
+ return DateDUtil.DateToStr(format,new Date(time));
+ }
+
+ /**
+ * 给出日期添加一段时间前的日期
+ * @param format
+ * @param date
+ * @param forth
+ * @return
+ */
+ public static String getForthDays(String format,Date date,long forth){
+
+
+ long time = date.getTime()- forth*24*60*60*1000;
+
+
+ return DateDUtil.DateToStr(format,new Date(time));
+ }
+
+ /**
+ * 给出时间添加几个小时后的时间
+ * @param format
+ * @param dateStr
+ * @param plus
+ * @return
+ */
+ public static String getPlusHours(String format,String dateStr,long plus){
+
+ Date date = DateDUtil.strToDate(format, dateStr);
+
+ long time = date.getTime()+ plus*60*60*1000;
+
+
+ return DateDUtil.DateToStr(format,new Date(time));
+ }
+
+ /**
+ * 给出时间添加几个分钟后的时间
+ * @param format
+ * @param dateStr
+ * @param plus
+ * @return
+ */
+ public static String getPlusMinutes(String format,String dateStr,long plus){
+
+ Date date = DateDUtil.strToDate(format, dateStr);
+
+ long time = date.getTime()+ plus*60*1000;
+
+
+ return DateDUtil.DateToStr(format,new Date(time));
+ }
+
+ /**
+ * 得到当前时间,格式如:yyyy-MM-dd HH:mm:ss:SS
+ * @return
+ */
+ public static String getCurrentTime(){
+
+ String nowTime = DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd_HH_mm_ss_SS, new Date());
+ return nowTime;
+ }
+
+ /**
+ * 得到当前时间,格式如:yyyy-MM-dd HH:mm:ss
+ * @return
+ */
+ public static String getTheCurrentTime(){
+
+ String nowTime = DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd_HH_mm_ss, new Date());
+ return nowTime;
+ }
+
+ /**
+ * 得到当前日期,格式如:yyyyMMdd
+ * @return
+ */
+ public static String getCurrentDate(){
+
+ String nowDate = DateDUtil.DateToStr(DateDUtil.yyyyMMdd, new Date());
+ return nowDate;
+ }
+
+ /**
+ * 得到当前日期,格式如:yyyyMMdd
+ * @return
+ */
+ public static String getCurrentDate(String format){
+
+ String nowDate = DateDUtil.DateToStr(format, new Date());
+ return nowDate;
+ }
+
+ /**
+ * 获取2个字符日期的分钟数差
+ * @param p_startDate
+ * @param p_endDate
+ * @return 相差的分钟
+ */
+ public static long getMinutesOfTowDiffDate(String p_startDate, String p_endDate ){
+
+ Date l_startDate = DateDUtil.strToDate(DateDUtil.yyyy_MM_dd_HH_mm_ss_SS, p_startDate);
+ Date l_endDate = DateDUtil.strToDate(DateDUtil.yyyy_MM_dd_HH_mm_ss_SS, p_endDate);
+ long l_startTime = l_startDate.getTime();
+ long l_endTime = l_endDate.getTime();
+ long betweenMinutes = (long) ( ( l_endTime - l_startTime ) / ( 1000 * 60) );
+ return betweenMinutes;
+ }
+
+ /**
+ * 获取2个字符日期的分钟数差
+ * @param p_startDate
+ * @param p_endDate
+ * @return 相差的分钟
+ */
+ public static long getMinutesOfTowDiffDateMin(String format,String p_startDate, String p_endDate ){
+
+ Date l_startDate = DateDUtil.strToDate(format, p_startDate);
+ Date l_endDate = DateDUtil.strToDate(format, p_endDate);
+ long l_startTime = l_startDate.getTime();
+ long l_endTime = l_endDate.getTime();
+ long betweenMinutes = (long) ( ( l_endTime - l_startTime ) / ( 1000 * 60) );
+ return betweenMinutes;
+ }
+ public static long getMonthIntervalOfTowDiffDate(String p_startMonth, String p_endMonth){
+
+ Date l_startDate = DateDUtil.strToDate(DateDUtil.yyyy_MM, p_startMonth);
+ Date l_endDate = DateDUtil.strToDate(DateDUtil.yyyy_MM, p_endMonth);
+
+
+ Calendar calender = Calendar.getInstance();
+ calender.setTime(l_startDate);
+
+ long l_startMonth = calender.get(Calendar.MONTH)+1;
+ long l_startYear = calender.get(Calendar.YEAR);
+
+ calender.setTime(l_endDate);
+
+ long l_endMonth =calender.get(Calendar.MONTH)+1;
+ long l_endYear = calender.get(Calendar.YEAR);
+
+ long betweenYear = l_endYear - l_startYear;
+ long betweenMonth = (long) ( l_endMonth - l_startMonth ) ;
+
+ return betweenYear * 12 + betweenMonth;
+ }
+
+ /**
+ * 将字符串日期转为cron表达式
+ */
+ public static String getCron(String execute_time) throws Exception{
+
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat(yyyy_MM_dd_HH_mm_ss);
+ Date date = simpleDateFormat.parse(execute_time);
+ SimpleDateFormat dateFormat = new SimpleDateFormat("ss mm HH dd MM ? yyyy");
+ return dateFormat.format(date);
+ }
+ /**
+ * 获取当前年月日日期
+ */
+
+ public static String getCDate(){
+ Calendar now = Calendar.getInstance();
+ String year=now.get(Calendar.YEAR)+"";
+ String month=(now.get(Calendar.MONTH) + 1) + "";
+ String day=now.get(Calendar.DAY_OF_MONTH)+"";
+ if ((now.get(Calendar.MONTH) + 1) < 10) month = "0" + month;
+ if (now.get(Calendar.DAY_OF_MONTH) < 10) day= "0" + day;
+ String nowDate = year+"年"+month+"月"+day+"日";
+ return nowDate;
+ }
+
+ public static List findWeekDays(String week) {
+ List list = new ArrayList();
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Calendar c = Calendar.getInstance();
+ // 今天是一周中的第几天
+ int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);
+
+ if (c.getFirstDayOfWeek() == Calendar.SUNDAY) {
+ c.add(Calendar.DAY_OF_MONTH, 1);
+ }
+
+ if("lastWeek".equals(week)){
+ dayOfWeek = -dayOfWeek-7;
+ }else if("thisWeek".equals(week)){
+ dayOfWeek = -dayOfWeek;
+ }else if("nextWeek".equals(week)){
+ dayOfWeek = -dayOfWeek+7;
+ }
+ // 计算一周开始的日期
+ c.add(Calendar.DAY_OF_MONTH, dayOfWeek);
+
+ for (int i = 1; i <= 7; i++) {
+ c.add(Calendar.DAY_OF_MONTH, 1);
+ list.add(sdf.format(c.getTime()));
+ }
+ return list;
+ }
+
+ public static void main(String[] args) {
+ System.out.println("111");
+ }
+
+}
diff --git a/src/main/java/com/saye/hrs/commons/encrypt/EncryptUtil.java b/src/main/java/com/saye/hrs/commons/encrypt/EncryptUtil.java
new file mode 100644
index 0000000..b409008
--- /dev/null
+++ b/src/main/java/com/saye/hrs/commons/encrypt/EncryptUtil.java
@@ -0,0 +1,68 @@
+package com.saye.hrs.commons.encrypt;
+
+import org.apache.commons.codec.binary.Base64;
+
+import java.io.UnsupportedEncodingException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+import javax.crypto.Cipher;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+
+public class EncryptUtil {
+
+ // AES ecb模式解密 key:秘钥 initVector:偏移量 encrypted:加密内容
+ public static String decrypt(String key,String initVector,String encrypted) {
+ try {
+ IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
+ SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
+
+ Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
+ cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
+ byte[] original = cipher.doFinal(Base64.decodeBase64(encrypted));
+
+ return new String(original);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ return null;
+ }
+
+ public static void main(String[] args) throws Exception {
+ System.out.println(decrypt("a6xdabhysfescfbu","encryptionIntVec","oYzamqnnyJ8GG6646PDYBQ=="));
+ }
+
+ public static String getSHA256Str(String str){
+ MessageDigest messageDigest;
+ String encodeStr = "";
+ try {
+ messageDigest = MessageDigest.getInstance("SHA-256");
+ messageDigest.update(str.getBytes("UTF-8"));
+ encodeStr = byte2Hex(messageDigest.digest());
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ return encodeStr;
+ }
+ /**
+ * 将byte转为16进制
+ * @param bytes
+ * @return
+ */
+ private static String byte2Hex(byte[] bytes){
+ StringBuffer stringBuffer = new StringBuffer();
+ String temp = null;
+ for (int i=0;i handleBindException(BindException e) {
+ return wrapErrors(e.getAllErrors());
+ }
+
+ /**
+ * 处理RequestBody validate的校验异常
+ */
+ @ExceptionHandler(MethodArgumentNotValidException.class)
+ public Result> handleMethodArgumentNotValidException(MethodArgumentNotValidException e) {
+ return wrapErrors(e.getBindingResult().getAllErrors());
+ }
+
+ /**
+ * 处理参数列表字段validate的校验异常
+ */
+ @ExceptionHandler(ConstraintViolationException.class)
+ public Result> handleConstraintViolationException(ConstraintViolationException e) {
+ return wrapErrors(e.getMessage());
+ }
+
+ /**
+ * 返回validate异常提示
+ * @param errors
+ * @return
+ */
+ private Result> wrapErrors(List errors) {
+ if(CollectionUtils.isEmpty(errors)){
+ return new Result<>(CodeMessageEnum.VALIDATE_ERROR.getCode(), "请求参数错误");
+ }
+
+ //validate的校验错误提示
+ List tipList = new ArrayList<>(errors.size());
+ SecureRandom random = new SecureRandom();
+ errors.forEach(error->{
+ if(error instanceof FieldError) {
+ FieldError fieldError = (FieldError)error;
+ tipList.add(fieldError.getField() + error.getDefaultMessage());
+ } else {
+ tipList.add(error.getObjectName() + random.nextInt() + error.getDefaultMessage());
+ }
+ });
+ String message = tipList.stream().collect(Collectors.joining(";"));
+ return new Result<>(CodeMessageEnum.VALIDATE_ERROR.getCode(), message);
+ }
+
+ /**
+ * 返回validate异常提示
+ * @param
+ * @return
+ */
+ private Result> wrapErrors(String message) {
+ if(message==null || "".equals(message)){
+ return new Result<>(CodeMessageEnum.VALIDATE_ERROR.getCode(), "请求参数错误");
+ }
+ //validate的校验错误提示
+ if (message.indexOf(".") == -1 || message.indexOf(":") == -1) {
+ return new Result<>(CodeMessageEnum.VALIDATE_ERROR.getCode(), "请求参数错误");
+ }
+
+ String prefix = message.split("\\.")[0];
+ message = message.replace(prefix + ".", "");
+
+ List tipList = new ArrayList<>();
+ // 判断是否存在多个字段
+ if (message.indexOf(",") == -1) {
+ String[] msgChildArr = message.split(":");
+ tipList.add(msgChildArr[0].trim() + msgChildArr[1].trim());
+ }else{
+ String[] msgArr = message.split(",");
+ for (String msg : msgArr) {
+ String[] msgChildArr = msg.split(":");
+ tipList.add(msgChildArr[0].trim() + msgChildArr[1].trim());
+ }
+ }
+ String tip = tipList.stream().collect(Collectors.joining(","));
+ return new Result<>(CodeMessageEnum.VALIDATE_ERROR.getCode(), tip);
+ }
+
+ @ExceptionHandler(NoHandlerFoundException.class)
+ @ResponseStatus(HttpStatus.NOT_FOUND)//处理的异常类型
+ public Result notFountHandler(NoHandlerFoundException e){
+ Result result = new Result(CodeMessageEnum.NOT_EXISTS.getCode(), "请求地址不存在");
+ return result;
+ }
+
+}
diff --git a/src/main/java/com/saye/hrs/commons/exception/CustomException.java b/src/main/java/com/saye/hrs/commons/exception/CustomException.java
new file mode 100644
index 0000000..4cc2951
--- /dev/null
+++ b/src/main/java/com/saye/hrs/commons/exception/CustomException.java
@@ -0,0 +1,113 @@
+package com.saye.hrs.commons.exception;
+
+/**
+ * @description: 自定义运行时异常,抛出不符合业务需求的结果异常
+ * @author zmc
+ */
+
+
+public class CustomException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 错误编码
+ */
+ private String errorCode;
+
+ /**
+ * 消息是否为属性文件中的Key
+ */
+ private boolean propertiesKey = true;
+
+ /**
+ * 构造一个基本异常.
+ *
+ * @param message 信息描述
+ */
+ public CustomException(String message)
+ {
+ super(message);
+ }
+
+ /**
+ * 构造一个基本异常.
+ *
+ * @param errorCode 错误编码
+ * @param message 信息描述
+ */
+ public CustomException(String errorCode, String message)
+ {
+ this(errorCode, message, true);
+ }
+
+ /**
+ * 构造一个基本异常.
+ *
+ * @param errorCode 错误编码
+ * @param message 信息描述
+ */
+ public CustomException(String errorCode, String message, Throwable cause)
+ {
+ this(errorCode, message, cause, true);
+ }
+
+ /**
+ * 构造一个基本异常.
+ *
+ * @param errorCode 错误编码
+ * @param message 信息描述
+ * @param propertiesKey 消息是否为属性文件中的Key
+ */
+ public CustomException(String errorCode, String message, boolean propertiesKey)
+ {
+ super(message);
+ this.setErrorCode(errorCode);
+ this.setPropertiesKey(propertiesKey);
+ }
+
+ /**
+ * 构造一个基本异常.
+ *
+ * @param errorCode 错误编码
+ * @param message 信息描述
+ */
+ public CustomException(String errorCode, String message, Throwable cause, boolean propertiesKey)
+ {
+ super(message, cause);
+ this.setErrorCode(errorCode);
+ this.setPropertiesKey(propertiesKey);
+ }
+
+ /**
+ * 构造一个基本异常.
+ *
+ * @param message 信息描述
+ * @param cause 根异常类(可以存入任何异常)
+ */
+ public CustomException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public String getErrorCode()
+ {
+ return errorCode;
+ }
+
+ public void setErrorCode(String errorCode)
+ {
+ this.errorCode = errorCode;
+ }
+
+ public boolean isPropertiesKey()
+ {
+ return propertiesKey;
+ }
+
+ public void setPropertiesKey(boolean propertiesKey)
+ {
+ this.propertiesKey = propertiesKey;
+ }
+
+}
diff --git a/src/main/java/com/saye/hrs/commons/getBean/GetBeanUtil.java b/src/main/java/com/saye/hrs/commons/getBean/GetBeanUtil.java
new file mode 100644
index 0000000..a7a50cd
--- /dev/null
+++ b/src/main/java/com/saye/hrs/commons/getBean/GetBeanUtil.java
@@ -0,0 +1,29 @@
+package com.saye.hrs.commons.getBean;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+@Component
+public class GetBeanUtil implements ApplicationContextAware {
+ protected static ApplicationContext applicationContext ;
+
+ @Override
+ public void setApplicationContext(ApplicationContext arg0) throws BeansException {
+ if (applicationContext == null) {
+ applicationContext = arg0;
+ }
+
+ }
+ public static Object getBean(String name) {
+ //name表示其他要注入的注解name名
+ return applicationContext.getBean(name);
+ }
+ /**
+ * 拿到ApplicationContext对象实例后就可以手动获取Bean的注入实例对象
+ */
+ public static T getBean(Class clazz) {
+ return applicationContext.getBean(clazz);
+ }
+}
diff --git a/src/main/java/com/saye/hrs/commons/idcard/Ic.java b/src/main/java/com/saye/hrs/commons/idcard/Ic.java
new file mode 100644
index 0000000..f158cd5
--- /dev/null
+++ b/src/main/java/com/saye/hrs/commons/idcard/Ic.java
@@ -0,0 +1,145 @@
+package com.saye.hrs.commons.idcard;
+
+
+import com.alibaba.fastjson.JSON;
+import com.saye.hrs.dto.WxybPay;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+
+/*
+ * 身份证升位规则:
+第一代身份证十五位数升为第二代身份证十八位数的一般规则是:
+第一步,在原十五位数身份证的第六位数后面插入19 ,这样身份证号码即为十七位数;
+第二步,按照国家规定的统一公式计算出第十八位数,作为校验码放在第二代身份证的尾号。
+验码计算方法:将身份证前十七位数分别乘以不同系数,
+从第一至十七位的系数分别为7、9、10、5、8、4、2、1、6、3、7、9、10、5、8、4、2,
+将这十七位数字和系数相乘的结果相加,用加出来的和除以11,看看余数是多少。
+余数只可能有0、1、2、3、4、5、6、7、8、9、10这十一个数字,
+其分别对应的最后一位身份证的号码为1、0、X、9、8、7、6、5、4、3、2,
+这样就得出了第二代身份证第十八位数的校验码。
+*/
+public class Ic {
+ // 主要计算方法,identifyCard是传入的15位身份证号
+ public static String get18Ic(String identifyCard) {
+
+ String retId = "";
+ String id17 = "";
+ int sum = 0;
+ int y = 0;
+ // 定义数组加权因子
+ int[] wf = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 };
+ // 定义数组存放校验码
+ String[] cc = { "1", "0", "x", "9", "8", "7", "6", "5", "4", "3", "2" };
+ // 在原15位数身份证的第六位数后面插入19
+ id17 = identifyCard.substring(0, 6) + "19" + identifyCard.substring(6);
+ // 17位数字和系数相乘,结果相加
+ for (int i = 0; i < 17; i++) {
+ sum = sum + Integer.valueOf(id17.substring(i, i + 1)) * wf[i];
+
+ }
+ // 计算余数
+ y = sum % 11;
+ // 通过模获得对应的校验码cc[yy];
+ retId = id17 + cc[y];
+ return retId;
+
+
+ }
+
+ // 读取文件,参数fileName为传入的要读取文件的路径及文件名
+ public static void readFileByLines(String fileName) {
+
+ File file = new File(fileName);
+ BufferedReader reader = null;
+ try {
+
+ reader=new BufferedReader(new FileReader(file));
+ String tempString=null;
+ int line=1;
+ //一次读取一行
+ while((tempString=reader.readLine())!=null){
+ //新的身份证号码
+ String returnId=get18Ic(tempString);
+ //写入到文件中
+ WriterFile(returnId);
+
+ line++;
+
+ }
+ reader.close();
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (reader != null) {
+
+ try {
+ reader.close();
+ } catch (Exception e) {
+ // TODO: handle exception
+ e.printStackTrace();
+ }
+ }
+
+ }
+
+ }
+
+ //存入文件的名称
+ static String file=null;
+ //参数returnID为返回的18位身份证号,是要写入文件的内容
+ public static void WriterFile(String returnID){
+ FileWriter fw = null ;
+ //如果文件不存在,创建文件
+ try {
+ File f=new File(file);
+ fw=new FileWriter(f,true);
+
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ PrintWriter pw=new PrintWriter(fw);
+ pw.println(returnID+"\n");
+ pw.flush();
+ try {
+ fw.flush();
+ pw.close();
+ fw.close();
+ } catch (Exception e) {
+ // TODO: handle exception
+ e.printStackTrace();
+ }
+ }
+
+ //以日期作为输出文件的文件名
+ public static String FileName(){
+ SimpleDateFormat simpleDateFormat;
+ simpleDateFormat =new SimpleDateFormat("yyyyMMddHHmmss");
+ Date date=new Date();
+ String filenametxt=simpleDateFormat.format(date);
+ return filenametxt;
+
+ }
+
+
+
+ public static void main(String[] args) {
+
+// String ic = get18Ic("130503670401001");
+//
+// System.out.println(ic);
+
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/saye/hrs/commons/log/ExceptionDUtil.java b/src/main/java/com/saye/hrs/commons/log/ExceptionDUtil.java
new file mode 100644
index 0000000..2ff46f2
--- /dev/null
+++ b/src/main/java/com/saye/hrs/commons/log/ExceptionDUtil.java
@@ -0,0 +1,43 @@
+package com.saye.hrs.commons.log;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+public class ExceptionDUtil {
+
+ /**
+ * 返回异常的详细信息
+ * @param e
+ * @return
+ */
+ public static String getDetailExceptionMsg(Exception e){
+
+ StringBuffer exceptionMessage = new StringBuffer();
+
+ StackTraceElement[] stackTraceElementes = e.getStackTrace();
+ int length = stackTraceElementes.length;
+ StackTraceElement ste;
+ //只要最顶上的错误栈
+ for(int i=0;i PostInfoByParam(String url, Object data) {
+ HashMap