Commit c2ebe0d0 authored by 王利建's avatar 王利建

Merge branch 'xh-relase-5.12' into 'master'

Xh relase 5.12

See merge request hscloud/hscloudagent-console!3
parents 4752f81f c6660225
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
#!/bin/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 "$@"
@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%
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.hs</groupId>
<artifactId>admin</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>admin</name>
<description>Admin project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>2.4.5</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.24</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.1.4</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.34.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.75</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.hs.admin;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@MapperScan("com.hs.admin.dao")
public class AdminApplication {
public static void main(String[] args) {
SpringApplication.run(AdminApplication.class, args);
}
}
package com.hs.admin.base;
public enum CodeMessageEnum {
REQUEST_SUCCESS("200", "服务成功返回请求数据"),
UPDATE_SUCCESS("201", "新建或修改数据成功"),
ASYNC_TASK("202", "异步任务"),
DELETE_SUCCESS("204", "删除数据成功"),
REQUEST_ERROR("400", "请求错误"),
NOT_AUTHORITY("401", "用户没有权限"),
RELATIONS_EXIST("402", "有用户正在参与活动,无法执行编辑或删除操作"),
ACCESS_BARRED("403", "禁止访问"),
RECORDS_NOT_EXIST("404", "记录不存在"),
QUOTA_OCCUPIED("802", "名额被占用,无法获取"),
FORMAT_NOT_AVAILABLE("406", "格式不可得"),
RESOURCES_HAS_DELETE("410", "资源已被删除"),
VALIDATION_ERROR("422", "创建对象时验证错误"),
SERVICE_ERROR("500", "服务器错误"),
GATEWAY_ERROR("502", "网关错误"),
SERVICE_NOT_AVAILABLE("503", "服务不可用"),
GATEWAY_TIMEOUT("504", "网关超时");
private String code;
private String msg;
CodeMessageEnum(String code, String msg) {
this.code = code;
this.msg = msg;
}
public String getcode(String msg) {
for (CodeMessageEnum codeMsg : CodeMessageEnum.values()) {
if (codeMsg.msg.equals(msg)) {
return codeMsg.code;
}
}
return null;
}
/**
* @description: 获取错误信息
* @param: code
* @return: String
* @author: XieHeng
* @date: 2021/5/6 10:08 上午
*/
public String getMsg(String code) {
for (CodeMessageEnum codeMsg : CodeMessageEnum.values()) {
if (codeMsg.code.equals(code)) {
return codeMsg.msg;
}
}
return null;
}
public String getCode() {
return code;
}
public String getMsg() {
return msg;
}
}
\ No newline at end of file
package com.hs.admin.base;
public class HsRuntimeException extends RuntimeException {
private static final long serialVersionUID = 1L;
/**
* 错误编码
*/
private String errorCode;
/**
* 消息是否为属性文件中的Key
*/
private boolean propertiesKey = true;
/**
* 构造一个基本异常.
*
* @param message 信息描述
*/
public HsRuntimeException(String message) {
super(message);
}
/**
* 构造一个基本异常.
*
* @param errorCode 错误编码
* @param message 信息描述
*/
public HsRuntimeException(String errorCode, String message) {
this(errorCode, message, true);
}
/**
* 构造一个基本异常.
*
* @param errorCode 错误编码
* @param message 信息描述
*/
public HsRuntimeException(String errorCode, String message, Throwable cause) {
this(errorCode, message, cause, true);
}
/**
* 构造一个基本异常.
*
* @param errorCode 错误编码
* @param message 信息描述
* @param propertiesKey 消息是否为属性文件中的Key
*/
public HsRuntimeException(String errorCode, String message, boolean propertiesKey) {
super(message);
this.setErrorCode(errorCode);
this.setPropertiesKey(propertiesKey);
}
/**
* 构造一个基本异常.
*
* @param errorCode 错误编码
* @param message 信息描述
*/
public HsRuntimeException(String errorCode, String message, Throwable cause, boolean propertiesKey) {
super(message, cause);
this.setErrorCode(errorCode);
this.setPropertiesKey(propertiesKey);
}
/**
* 构造一个基本异常.
*
* @param message 信息描述
* @param cause 根异常类(可以存入任何异常)
*/
public HsRuntimeException(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;
}
}
package com.hs.admin.base;
public enum JobStateEnum {
NONE(0),
NORMAL(1),
PAUSED(2),
COMPLETE(3),
ERROR(4),
BLOCKED(5);
JobStateEnum(Integer code) {
this.code = code;
}
private Integer code;
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public static void main(String[] args) {
System.out.println(JobStateEnum.NORMAL.getCode());
}
}
\ No newline at end of file
package com.hs.admin.base;
import com.hs.admin.util.JsonUtils;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import static java.util.stream.Collectors.joining;
/**
* @Description:AOP拦截打印请求地址、参数
* @Author 何志鹏
* @Date 2020/6/1 14:30
* @Version 1.0
*/
@Aspect
@Component
@Slf4j
public class LogAspect {
//设置切面点
@Pointcut(value = "(execution(* com.hs.admin.controller.*.*(..)))")
public void webLog() {}
//指定切点前的处理方法
@Before("webLog()")
public void doBefore(JoinPoint joinPoint) throws Exception {
//获取request对象
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
StringBuilder sb = new StringBuilder();
//拼接请求内容
sb.append("\n>>>>>>>>>请求路径:" + request.getRequestURL().toString() + " " + request.getMethod() + "\n");
//判断请求是什么请求
if (request.getMethod().equalsIgnoreCase(RequestMethod.GET.name())) {
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, String> paramMap = new HashMap<>();
parameterMap.forEach((key, value) -> paramMap.put(key, Arrays.stream(value).collect(joining(","))));
sb.append(">>>>>>>>>请求参数:" + JsonUtils.beanToJson(paramMap));
} else if (request.getMethod().equalsIgnoreCase(RequestMethod.POST.name()) || request.getMethod().equalsIgnoreCase(RequestMethod.PUT.name())) {
Object[] args = joinPoint.getArgs();
StringBuilder stringBuilder = new StringBuilder();
Arrays.stream(args).forEach(object -> stringBuilder.append(object.toString().replace("=",":")));
if (stringBuilder.length() == 0){
stringBuilder.append("{}");
}
sb.append(">>>>>>>>>请求参数:").append(stringBuilder.toString());
}
log.info(sb.toString());
}
//指定切点前的处理方法
@AfterReturning(pointcut = "webLog()",returning = "result")
public void doAfterReturning(Object result) {
if (ObjectUtils.isEmpty(result)){
return;
}
log.info("\n>>>>>>>>>返回結果:" + JsonUtils.beanToJson(result));
}
}
\ No newline at end of file
package com.hs.admin.base;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
@AllArgsConstructor
public class PageResult<E> {
/**
* 总记录数
*/
private Long total;
/**
* 列表
*/
private List<E> list;
}
\ No newline at end of file
package com.hs.admin.base;
import java.io.Serializable;
/**
* @author xieheng
*/
public class Result implements Serializable {
private static final long serialVersionUID = -1L;
/**
* 状态码
*/
private Boolean success;
/**
* 结果消息
*/
private String message;
/**
* 错误码
*/
private String code;
/**
* 返回的数据
*/
private Object data;
/**
* 当前系统时间
*/
private Long timeStamp;
public Result() {
}
/**
* 构造函数
*
* @param success
* @param message
* @param code
* @param data
*/
public Result(Boolean success, String message, String code, Object data) {
this.success = success;
this.message = message;
this.code = code;
this.data = data;
this.timeStamp = System.currentTimeMillis();
}
/**
* 构造函数
*
* @param success
* @param code
* @param data
*/
public Result(Boolean success, String code, Object data) {
this.success = success;
this.code = code;
this.data = data;
this.timeStamp = System.currentTimeMillis();
}
public Result(Boolean success, String message, String code, Object data, long timeStamp) {
this.success = success;
this.message = message;
this.code = code;
this.data = data;
this.timeStamp = timeStamp;
}
/**
* 返回失败
*
* @param codeMessageEnum
* @return
*/
public static Result returnError(CodeMessageEnum codeMessageEnum) {
return new Result(Boolean.FALSE, codeMessageEnum.getMsg(), codeMessageEnum.getCode(), null, System.currentTimeMillis());
}
public static Result returnError() {
return new Result(Boolean.FALSE, CodeMessageEnum.SERVICE_ERROR.getMsg(), CodeMessageEnum.SERVICE_ERROR.getCode(), null, System.currentTimeMillis());
}
/**
* 返回成功
*
* @param data
* @return
*/
public static Result returnSuccess(Object data) {
return new Result(Boolean.TRUE, CodeMessageEnum.REQUEST_SUCCESS.getMsg(), CodeMessageEnum.REQUEST_SUCCESS.getCode(), data, System.currentTimeMillis());
}
/**
* 返回自定义异常
*
* @param e
* @return
*/
public static Result returnHsException(HsRuntimeException e) {
return new Result(Boolean.FALSE, e.getMessage(), e.getErrorCode(), null, System.currentTimeMillis());
}
public Boolean getSuccess() {
return success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
public Long getTimeStamp() {
return timeStamp;
}
public void setTimeStamp(Long timeStamp) {
this.timeStamp = timeStamp;
}
}
\ No newline at end of file
package com.hs.admin.base;
public enum StateEnum {
NOT_BUILD(0, "待生成"),
ENABLE(1, "启用"),
CLOSE(2, "关闭"),
DELETE(3, "删除")
;
private Integer code;
private String value;
private StateEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public Integer getCode() {
return code;
}
public String getValue() {
return value;
}
}
package com.hs.admin.bean;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* jcb
* @author
*/
@Data
public class Jcb implements Serializable {
private Integer id;
private Integer jcbId;
private String dbName;
private String dbPwd;
private String dbUsername;
private String host;
private String name;
private String port;
private String remark;
private Integer state;
private Date gmtCreate;
private Integer type;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hs.admin.bean;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* sys_task
* @author
*/
@Data
public class SysTask implements Serializable {
private Integer id;
/**
* 租户id
*/
private Integer jcbId;
/**
* 任务名
*/
private String jobName;
/**
* 任务描述
*/
private String content;
/**
* cron表达式
*/
private String cronExpression;
/**
* 任务执行时调用哪个类的方法 包名+类名
*/
private String beanClass;
/**
* 任务状态:NONE:0 ,NORMAL:1 ,PAUSED:2 ,COMPLETE:3 ,ERROR:4 ,BLOCKED:5
*/
private Integer jobStatus;
/**
* 任务分组
*/
private String jobGroup;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 任务操作类型:1查询2新增3修改4删除
*/
private Integer type;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hs.admin.bean;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* user
* @author
*/
@Data
public class User implements Serializable {
private Integer id;
private String userName;
private String password;
private Date gmtCreate;
private Date gmtModify;
public User(String userName, String password) {
this.userName = userName;
this.password = password;
}
public User() {
}
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hs.admin.config;
/**
* @author xieheng
*/
public class GlobalConfig {
public static final String PWD_SALT = "PHSA4DR2WS8DF01DGT7";
}
package com.hs.admin.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
}
}
\ No newline at end of file
package com.hs.admin.controller;
import com.hs.admin.base.HsRuntimeException;
import com.hs.admin.base.PageResult;
import com.hs.admin.base.Result;
import com.hs.admin.bean.Jcb;
import com.hs.admin.dto.JcbDto;
import com.hs.admin.service.JcbService;
import com.hs.admin.util.JsonUtils;
import com.hs.admin.util.LogUtil;
import com.hs.admin.util.LoginUserUtil;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @author xieheng
*/
@RestController
public class JcbController {
@Resource
LoginUserUtil loginUserUtil;
@Resource
JcbService jcbService;
/**
* @description: 添加租户/修改
* @param: jcbDto
* @return: String
* @author: XieHeng
* @date: 2021/5/10 8:49 上午
*/
@PutMapping(value = "/api/admin/saveJcb")
public String saveJcb(@RequestBody @Validated JcbDto jcbDto) {
Result result;
try {
loginUserUtil.getLoginUser();
boolean b = jcbService.saveJcb(jcbDto);
if (b) {
result = Result.returnSuccess(null);
} else {
result = Result.returnError();
}
} catch (HsRuntimeException e) {
LogUtil.error("\n>>>>>saveJcb错误日志:"+e);
result = Result.returnHsException(e);
} catch (Exception e) {
LogUtil.error("\n>>>>>saveJcb错误日志:"+e);
result = Result.returnError();
}
return JsonUtils.beanToJson(result);
}
/**
* @description: 删除租户
* @param: jcbId
* @return: String
* @author: XieHeng
* @date: 2021/5/10 9:02 上午
*/
@GetMapping(value = "/api/admin/deleteJcb")
public String delJcb(Integer id) {
Result result;
try {
loginUserUtil.getLoginUser();
boolean b = jcbService.delJcb(id);
if (b) {
result = Result.returnSuccess(null);
} else {
result = Result.returnError();
}
} catch (HsRuntimeException e) {
LogUtil.error("\n>>>>>deleteJcb错误日志:"+e);
result = Result.returnHsException(e);
} catch (Exception e) {
LogUtil.error("\n>>>>>deleteJcb错误日志:"+e);
result = Result.returnError();
}
return JsonUtils.beanToJson(result);
}
/**
* @description: 获取租户列表
* @param: pageNum
* @param: pageSize
* @return: String
* @author: XieHeng
* @date: 2021/5/10 9:04 上午
*/
@GetMapping(value = "/api/admin/getJcbList")
public String getJcbList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "20") Integer pageSize) {
Result result;
try {
loginUserUtil.getLoginUser();
PageResult<Jcb> pageResult = jcbService.getJcbList(pageNum, pageSize);
result = Result.returnSuccess(pageResult);
} catch (HsRuntimeException e) {
LogUtil.error("\n>>>>>getJcbList错误日志:"+e);
result = Result.returnHsException(e);
} catch (Exception e) {
LogUtil.error("\n>>>>>getJcbList错误日志:"+e);
result = Result.returnError();
}
return JsonUtils.beanToJson(result);
}
}
package com.hs.admin.controller;
import com.hs.admin.base.HsRuntimeException;
import com.hs.admin.base.Result;
import com.hs.admin.dto.UserDto;
import com.hs.admin.service.UserService;
import com.hs.admin.util.JsonUtils;
import com.hs.admin.util.LogUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Map;
/**
* @author xieheng
*/
@Controller
public class LoginController {
@Resource
UserService userService;
// @Resource
// LoginUserUtil loginUserUtil;
/**
* @description: 登录
* @param: userDto
* @return: String
* @author: XieHeng
* @date: 2021/5/8 3:20 下午
*/
@ResponseBody
@PostMapping(value = "/api/admin/login")
public String login(@RequestBody UserDto userDto) {
Result result;
try {
Map<String, Object> resultMap = userService.login(userDto);
result = Result.returnSuccess(resultMap);
} catch (HsRuntimeException e) {
result = Result.returnHsException(e);
} catch (Exception e) {
LogUtil.error(">>>>>\nlogin错误日志:" + e);
result = Result.returnError();
}
return JsonUtils.beanToJson(result);
}
/**
* @description: 用户列表
* @param: pageNum
* @param: pageSize
* @return: String
* @author: XieHeng
* @date: 2021/5/8 5:37 下午
*/
/* @GetMapping(value = "/api/admin/userList")
public String userList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "20") Integer pageSize) {
Result result;
try {
loginUserUtil.getLoginUser();
List<Map> userList = userService.getList(pageNum, pageSize);
result = Result.returnSuccess(userList);
} catch (HsRuntimeException e) {
result = Result.returnHsException(e);
} catch (Exception e) {
e.printStackTrace();
result = Result.returnError();
}
return JsonUtil.beanToJson(result);
}*/
@GetMapping(value = "/api/admin/index")
public String index(){
return "index";
}
}
package com.hs.admin.controller;
import com.hs.admin.base.HsRuntimeException;
import com.hs.admin.base.PageResult;
import com.hs.admin.base.Result;
import com.hs.admin.dto.TaskDto;
import com.hs.admin.service.TaskService;
import com.hs.admin.util.JsonUtils;
import com.hs.admin.util.LogUtil;
import com.hs.admin.util.LoginUserUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Map;
/**
* @author xieheng
*/
@RestController
public class TaskController {
@Resource
LoginUserUtil loginUserUtil;
@Resource
TaskService taskService;
/**
* @description: 添加任务
* @param: dto
* @return: String
* @author: XieHeng
* @date: 2021/5/10 3:23 下午
*/
/*
@PutMapping(value = "/api/admin/saveTask")
public String saveTask(@RequestBody @Validated TaskDto dto) {
Result result;
try {
loginUserUtil.getLoginUser();
boolean b = taskService.saveTask(dto);
if (b) {
result = Result.returnSuccess(null);
} else {
result = Result.returnError();
}
} catch (HsRuntimeException e) {
result = Result.returnHsException(e);
} catch (Exception e) {
result = Result.returnError();
}
return JsonUtil.beanToJson(result);
}
@GetMapping(value = "/api/admin/delTask")
public String delTask(Integer taskId) {
Result result;
try {
loginUserUtil.getLoginUser();
boolean b = taskService.delTask(taskId);
if (b) {
result = Result.returnSuccess(null);
} else {
result = Result.returnError();
}
} catch (HsRuntimeException e) {
result = Result.returnHsException(e);
} catch (Exception e) {
result = Result.returnError();
}
return JsonUtil.beanToJson(result);
}
*/
/**
* @description: 获取分页数据
* @param: taskDto
* @return: String
* @author: XieHeng
* @date: 2021/5/10 3:38 下午
*/
@GetMapping(value = "/api/admin/getTaskList")
public String getTaskList(TaskDto taskDto) {
Result result;
try {
loginUserUtil.getLoginUser();
PageResult<Map> pageResult = taskService.getTaskList(taskDto);
result = Result.returnSuccess(pageResult);
} catch (HsRuntimeException e) {
LogUtil.error("\n>>>>/api/admin/getTaskList错误日志:"+e);
result = Result.returnHsException(e);
} catch (Exception e) {
LogUtil.error("\n>>>>/api/admin/getTaskList错误日志:"+e);
result = Result.returnError();
}
return JsonUtils.beanToJson(result);
}
}
package com.hs.admin.controller;
import com.hs.admin.dto.UserDto;
import com.hs.admin.base.HsRuntimeException;
import com.hs.admin.base.Result;
import com.hs.admin.service.UserService;
import com.hs.admin.util.JsonUtils;
import com.hs.admin.util.LoginUserUtil;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @author xieheng
*/
@RestController
public class UserContrller {
@Resource
UserService userService;
@Resource
LoginUserUtil loginUserUtil;
/*
@PutMapping(value = "/api/admin/saveUser")
public String saveUser(@RequestBody UserDto userDto) {
Result result;
try {
loginUserUtil.getLoginUser();
boolean b = userService.saveUser(userDto);
if (b) {
result = Result.returnSuccess(null);
} else {
result = Result.returnError();
}
} catch (HsRuntimeException e) {
result = Result.returnHsException(e);
} catch (Exception e) {
result = Result.returnError();
}
return JsonUtil.beanToJson(result);
}
*/
/**
* @description: 修改密码
* @param: userDto
* @return: String
* @author: XieHeng
* @date: 2021/5/8 3:00 下午
*/
@PutMapping(value = "/api/admin/editPassword")
public String editPassword(@RequestBody UserDto userDto) {
Result result;
try {
loginUserUtil.getLoginUser();
boolean b = userService.editPassword(userDto);
if (b) {
result = Result.returnSuccess(null);
} else {
result = Result.returnError();
}
} catch (HsRuntimeException e) {
result = Result.returnHsException(e);
} catch (Exception e) {
result = Result.returnError();
}
return JsonUtils.beanToJson(result);
}
}
package com.hs.admin.dao;
import com.hs.admin.bean.Jcb;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author xieheng
*/
public interface JcbDao {
int deleteByPrimaryKey(Integer jcbId);
int insert(Jcb record);
Jcb selectByPrimaryKey(Integer jcbId);
int updateByPrimaryKey(Jcb record);
int delJcb(Integer id);
List<Jcb> findAllByState(@Param("index") Integer index, @Param("pageSize") Integer pageSize);
int updateById(Jcb jcb);
int checkTask(Integer id);
int getCount(Integer jcbId);
long getTotalCount();
}
\ No newline at end of file
package com.hs.admin.dao;
import com.hs.admin.bean.SysTask;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface SysTaskDao {
int deleteByPrimaryKey(Integer id);
int insert(SysTask record);
int insertSelective(SysTask record);
SysTask selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(SysTask record);
int updateByPrimaryKey(SysTask record);
int delTask(Integer taskId);
List<Map> findAllByCondition(HashMap<String, Object> map);
int delTaskById(Integer id);
Long getTotalCount(HashMap<String, Object> map);
}
\ No newline at end of file
package com.hs.admin.dao;
import com.hs.admin.bean.User;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface UserDao {
int deleteByPrimaryKey(Integer id);
int insert(User record);
int insertSelective(User record);
User selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(User record);
int updateByPrimaryKey(User record);
User findByUserNameAndPassword(@Param("username") String username, @Param("password") String password);
List<Map> findUserList();
}
\ No newline at end of file
package com.hs.admin.dto;
import lombok.Data;
@Data
public class JcbDto {
private Integer id;
private Integer jcbId;
private String jcbName;
private String host;
private String port;
private String dbName;
private String dbUsername;
private String dbPwd;
private String remark;
private Integer type;
}
package com.hs.admin.dto;
import lombok.Data;
@Data
public class TaskDto {
private Integer id;
private Integer pageNum = 1;
private Integer pageSize = 20;
private Integer jcbId;
private String name;
private Integer type;
private String cronExpression;
private String beanClass;
private String jobStatus;
private String jobGroup;
private String content;
}
package com.hs.admin.dto;
import lombok.Data;
@Data
public class UserDto {
private Integer id;
private String username;
private String password;
private String newpassword;
}
package com.hs.admin.service;
import com.hs.admin.base.PageResult;
import com.hs.admin.bean.Jcb;
import com.hs.admin.dto.JcbDto;
import java.util.List;
/**
* @author xieheng
*/
public interface JcbService {
boolean saveJcb(JcbDto jcbDto);
boolean delJcb(Integer jcbId);
PageResult<Jcb> getJcbList(Integer pageNum, Integer pageSize);
}
package com.hs.admin.service;
import com.hs.admin.base.PageResult;
import com.hs.admin.bean.SysTask;
import com.hs.admin.dto.TaskDto;
import java.util.Map;
/**
* @author xieheng
*/
public interface TaskService {
boolean saveTask(TaskDto dto);
boolean delTask(Integer taskId);
PageResult<Map> getTaskList(TaskDto taskDto);
}
package com.hs.admin.service;
import com.hs.admin.dto.UserDto;
import java.util.List;
import java.util.Map;
/**
* @author xieheng
*/
public interface UserService {
boolean saveUser(UserDto userDto);
boolean editPassword(UserDto userDto);
Map login(UserDto userDto);
List<Map> getList(Integer pageNum, Integer pageSize);
}
package com.hs.admin.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hs.admin.base.CodeMessageEnum;
import com.hs.admin.base.HsRuntimeException;
import com.hs.admin.base.PageResult;
import com.hs.admin.base.StateEnum;
import com.hs.admin.bean.Jcb;
import com.hs.admin.dao.JcbDao;
import com.hs.admin.dao.SysTaskDao;
import com.hs.admin.dto.JcbDto;
import com.hs.admin.service.JcbService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
* @author xieheng
*/
@Service
public class JcbServiceImpl implements JcbService {
@Resource
JcbDao jcbDao;
@Resource
SysTaskDao sysTaskDao;
@Override
public boolean saveJcb(JcbDto jcbDto) {
Integer id = jcbDto.getId();
Integer jcbId = jcbDto.getJcbId();
String jcbName = jcbDto.getJcbName();
String remark = jcbDto.getRemark();
String dbName = jcbDto.getDbName();
String host = jcbDto.getHost();
String port = jcbDto.getPort();
String username = jcbDto.getDbUsername();
String pwd = jcbDto.getDbPwd();
Integer type = jcbDto.getType();
if (StringUtils.isEmpty(jcbId)) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "租户编号不能为空");
}
if (StringUtils.isEmpty(jcbName)) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "租户名称不能为空");
}
if (StringUtils.isEmpty(dbName)) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "数据库表名称不能为空");
}
if (StringUtils.isEmpty(host)) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "数据库连接不能为空");
}
if (StringUtils.isEmpty(port)) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "数据库端口号不能为空");
}
if (StringUtils.isEmpty(username)) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "数据库账号不能为空");
}
if (StringUtils.isEmpty(pwd)) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "数据库密码不能为空");
}
Jcb jcb = new Jcb();
jcb.setJcbId(jcbId);
jcb.setName(jcbName);
jcb.setRemark(StringUtils.isEmpty(remark) ? "" : remark);
jcb.setHost(host);
jcb.setPort(port);
jcb.setDbName(dbName);
jcb.setDbUsername(username);
jcb.setDbPwd(pwd);
jcb.setType(ObjectUtils.isEmpty(type) ? 1 : type);
if (id == null) {
int count = jcbDao.getCount(jcbId);
if (count > 0) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "租户已经存在,不能重复添加");
}
jcb.setState(StateEnum.ENABLE.getCode());
jcb.setGmtCreate(new Date());
return jcbDao.insert(jcb) == 1;
} else {
jcb.setId(id);
return jcbDao.updateById(jcb) == 1;
}
}
/**
* @description: 删除租户
* @param: jcbId
* @return: boolean
* @author: XieHeng
* @date: 2021/5/10 9:01 上午
*/
@Override
@Transactional(rollbackFor = Exception.class)
public boolean delJcb(Integer id) {
if (id == null || id < 1) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "参数错误");
}
//校验是否有存在正常的任务。否则不能删除租户
int i = jcbDao.checkTask(id);
if (i > 0) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "租户存在任务,不能删除");
}
if (jcbDao.delJcb(id) == 1) {
sysTaskDao.delTaskById(id);
return true;
}
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "删除失败");
}
@Override
public PageResult<Jcb> getJcbList(Integer pageNum, Integer pageSize) {
Integer index = (pageNum - 1) * pageSize;
Long totalCount = jcbDao.getTotalCount();
List<Jcb> jcbList = jcbDao.findAllByState(index, pageSize);
return new PageResult<>(totalCount, jcbList);
}
}
package com.hs.admin.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hs.admin.base.CodeMessageEnum;
import com.hs.admin.base.HsRuntimeException;
import com.hs.admin.base.PageResult;
import com.hs.admin.base.StateEnum;
import com.hs.admin.bean.Jcb;
import com.hs.admin.bean.SysTask;
import com.hs.admin.dao.SysTaskDao;
import com.hs.admin.dto.TaskDto;
import com.hs.admin.service.JcbService;
import com.hs.admin.service.TaskService;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import javax.print.attribute.standard.JobName;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xieheng
*/
@Service
public class TaskServiceImpl implements TaskService {
@Resource
SysTaskDao taskDao;
@Resource
JcbService jcbService;
@Override
public boolean saveTask(TaskDto dto) {
Integer jcbId = dto.getJcbId();
Integer id = dto.getId();
String beanClass = dto.getBeanClass();
String cronExpression = dto.getCronExpression();
String jobGroup = dto.getJobGroup();
Integer type = dto.getType();
String name = dto.getName();
SysTask sysTask = new SysTask();
if (!StringUtils.isEmpty(name)) {
sysTask.setJobName(name);
}
if (!StringUtils.isEmpty(type)) {
sysTask.setType(type);
}
if (!StringUtils.isEmpty(cronExpression)) {
sysTask.setCronExpression(cronExpression);
}
if (!StringUtils.isEmpty(beanClass)) {
sysTask.setBeanClass(beanClass);
}
if (!StringUtils.isEmpty(name)) {
sysTask.setJobName(name);
}
if (!StringUtils.isEmpty(jobGroup)) {
sysTask.setJobGroup(jobGroup);
}
if (id == null) {
sysTask.setJcbId(jcbId);
sysTask.setContent("");
sysTask.setJobStatus(StateEnum.ENABLE.getCode());
sysTask.setCreateTime(new Date());
sysTask.setUpdateTime(new Date());
return taskDao.insert(sysTask) == 1;
} else {
sysTask.setId(id);
return taskDao.updateByPrimaryKey(sysTask) == 1;
}
}
@Override
public boolean delTask(Integer taskId) {
int i = 0;
try {
i = taskDao.delTask(taskId);
} catch (Exception e) {
e.printStackTrace();
}
return i == 1;
}
@Override
public PageResult<Map> getTaskList(TaskDto taskDto) {
Integer jcbId = taskDto.getJcbId();
if (jcbId == null) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "缺少租户Id");
}
Integer index = (taskDto.getPageNum() - 1) * taskDto.getPageSize();
HashMap<String, Object> map = new HashMap<>();
map.put("jcbId", jcbId);
map.put("index", index);
map.put("pageSize", taskDto.getPageSize());
Long totalCount = taskDao.getTotalCount(map);
List<Map> sysTaskList = taskDao.findAllByCondition(map);
return new PageResult<>(totalCount, sysTaskList);
}
}
package com.hs.admin.service.impl;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.hs.admin.bean.User;
import com.hs.admin.dao.UserDao;
import com.hs.admin.dto.UserDto;
import com.hs.admin.base.CodeMessageEnum;
import com.hs.admin.base.HsRuntimeException;
import com.hs.admin.config.GlobalConfig;
import com.hs.admin.service.UserService;
import com.hs.admin.util.PasswordUtil;
import com.hs.admin.util.TokenUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
/**
* @author xieheng
*/
@Service
public class UserServiceImpl implements UserService {
@Resource
UserDao userDao;
@Override
public boolean saveUser(UserDto dto) {
String username = dto.getUsername();
String password = dto.getPassword().replaceAll(" ", "");
if (StringUtils.isEmpty(username)) {
throw new HsRuntimeException(CodeMessageEnum.RECORDS_NOT_EXIST.getCode(), "用户名不能为空");
}
if (StringUtils.isEmpty(password)) {
throw new HsRuntimeException(CodeMessageEnum.RECORDS_NOT_EXIST.getCode(), "密码不能为空");
}
if (password.length() < 6) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "密码长度不合要求");
}
password = PasswordUtil.passwordEncode(password, GlobalConfig.PWD_SALT);
User user = new User();
user.setUserName(username);
user.setPassword(password);
user.setGmtCreate(new Date());
user.setGmtModify(new Date());
try {
userDao.insert(user);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
/**
* @description: 修改密码
* @param: userDto
* @return: boolean
* @author: XieHeng
* @date: 2021/5/8 3:00 下午
*/
@Override
public boolean editPassword(UserDto userDto) {
if (userDto.getId() < 1) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "参数错误");
}
User user = userDao.selectByPrimaryKey(userDto.getId());
if (user == null) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "用户不存在");
}
String password = userDto.getPassword();
String newpassword = userDto.getNewpassword();
if (StringUtils.isEmpty(password) || StringUtils.isEmpty(newpassword)) {
throw new HsRuntimeException(CodeMessageEnum.RECORDS_NOT_EXIST.getCode(), "密码不能为空");
}
if (password.length() < 6) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "密码长度不合要求");
}
String passwordEncode = PasswordUtil.passwordEncode(password, GlobalConfig.PWD_SALT);
if (!user.getPassword().equals(passwordEncode)) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "更改密码失败,原密码错误");
}
password = PasswordUtil.passwordEncode(newpassword, GlobalConfig.PWD_SALT);
user.setPassword(password);
user.setGmtModify(new Date());
try {
userDao.updateByPrimaryKey(user);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public Map<String, Object> login(UserDto userDto) {
String username = userDto.getUsername();
String password = userDto.getPassword();
if (StringUtils.isEmpty(password) || StringUtils.isEmpty(username)) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "用户名或密码错误");
}
if ("administrator".equals(username) && "administrator".equals(password)) {
String token = TokenUtils.token(username, password);
Map<String, Object> map = new HashMap<>();
map.put("token", token);
return map;
}
password = PasswordUtil.passwordEncode(password, GlobalConfig.PWD_SALT);
User user = userDao.findByUserNameAndPassword(username, password);
if (user != null) {
String token = TokenUtils.token(username, password);
Map<String, Object> map = new HashMap<>();
map.put("token", token);
map.put("userId", user.getId());
return map;
}
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(), "用户名或密码错误");
}
@Override
public List<Map> getList(Integer pageNum, Integer pageSize) {
return userDao.findUserList();
}
}
package com.hs.admin.util;
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;
/**
* @Author: Lee CE @Description: @Date: 2018/7/13 10:31 @Modified:
*/
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> T jsonToBean(String json, Class<T> 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<String, String> map = new HashMap<String, String>();
map.put(key, value);
return beanToJson(map, null);
}
/**
* json字符串转map
*
* @param json
* @return
*/
public static Map<String, Object> jsonToMap(String json) {
if (StringUtils.isEmpty(json)) {
return null;
}
return JSON.parseObject(json, Map.class);
}
/**
* json字符串转list
*
* @param jsonStr
* @return
*/
public static <T> List<T> stringToList(String jsonStr, Class<T> model) {
List<T> object = (List<T>) JSONArray.parseArray(jsonStr, model);
return object;
}
public static <T> List<String> stringToList2(String jsonStr, Class<String> model) {
List<java.lang.String> object = (List<String>) JSONArray.parseArray(jsonStr, model);
return object;
}
public static <T> List<T> jsonToList(String json, Class<T> clazz) {
if (StringUtils.isEmpty(json)) {
return null;
}
return JSONArray.parseArray(json, clazz);
}
}
package com.hs.admin.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class LogUtil {
private static final Logger LOGGER = LoggerFactory.getLogger("error");
/**
* @Description: 记录debug日志
* @params: [messages]
* @Return: void
* @Author: lixin
* @Date: 2018/11/2 14:19
* @Modified:
*/
public static void debug(String... messages) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(mergeStrings(messages));
}
}
/**
* @Description: 记录Info日志
* @params: [messages]
* @Return: void
* @Author: lixin
* @Date: 2018/11/2 14:19
* @Modified:
*/
public static void info(String... messages) {
if (LOGGER.isInfoEnabled()) {
LOGGER.info(mergeObjects(messages));
}
}
/**
* @Description: 记录warn日志
* @params: [messages]
* @Return: void
* @Author: lixin
* @Date: 2018/11/2 14:19
* @Modified:
*/
public static void warn(String... messages) {
if (LOGGER.isWarnEnabled()) {
LOGGER.warn(mergeObjects(messages));
}
}
/**
* @Description: 记录错误日志
* @params: [messages]
* @Return: void
* @Author: lixin
* @Date: 2018/11/2 14:23
* @Modified:
*/
public static void error(String... messages) {
if (LOGGER.isErrorEnabled()) {
LOGGER.error(mergeStrings(messages));
}
}
/**
* @Description: 记录fatal错误日志
* @params: [messages]
* @Return: void
* @Author: weiyuqi
* @Date: 2019/6/17 14:20
* @Modified:
*/
public static void fatal(String... messages) {
if (LOGGER.isErrorEnabled()) {
LOGGER.error(mergeStrings(messages));
}
}
/**
* @Description: 记录错误日志
* @params: [e, messages]
* @Return: void
* @Author: lixin
* @Date: 2018/11/2 14:23
* @Modified:
*/
public static void error(Throwable e, String... messages) {
if (LOGGER.isErrorEnabled()) {
if (e == null) {
LOGGER.error(mergeStrings(messages));
} else {
LOGGER.error(mergeStrings(messages), e);
}
}
}
/**
* @Description: 记录fatal日志
* @params: [e, messages]
* @Return: void
* @Author: weiyuqi
* @Date: 2019/6/17 14:22
* @Modified:
*/
public static void fatal(Throwable e, String... messages) {
if (LOGGER.isErrorEnabled()) {
if (e == null) {
LOGGER.error(mergeStrings(messages));
} else {
LOGGER.error(mergeStrings(messages), e);
}
}
}
/**
* @Description: 将string数组合并为一个字符串返回
* @params: [strings]
* @Return: java.lang.String
* @Author: lixin
* @Date: 2018/11/2 14:21
* @Modified:
*/
private static String mergeStrings(String[] strings) {
if (strings == null) {
return "";
}
StringBuilder stringBuilder = new StringBuilder();
for (String string : strings) {
stringBuilder.append(string);
}
return stringBuilder.toString();
}
/**
* @Description: 将string数组合并为一个字符串返回
* @params: [objects]
* @Return: java.lang.String
* @Author: lixin
* @Date: 2018/11/2 14:21
* @Modified:
*/
private static String mergeObjects(Object[] objects) {
if (objects == null) {
return "";
}
StringBuilder stringBuilder = new StringBuilder();
for (Object obj : objects) {
if (obj == null) {
continue;
}
if (obj instanceof String) {
stringBuilder.append(obj);
} else {
stringBuilder.append(obj.toString());
}
}
return stringBuilder.toString();
}
}
package com.hs.admin.util;
import com.hs.admin.bean.User;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
@Component
public class LoginUserUtil {
public User getLoginUser() {
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = servletRequestAttributes.getRequest();
String token = request.getHeader("token");
return TokenUtils.verify(token);
}
}
package com.hs.admin.util;
import javax.crypto.*;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
/**
* 使用:
* 直接使用即可,至于具体参数,看下面方法的说明即可;
* 1. PasswordUtil.MD5Encode(); MD5不可逆简单加密:散列函数-基于HASH算法的编码
* 2. PasswordUtil.AESEncrypt(); AES加密
* 3. PasswordUtil.AESDecrypt(); AES解密
* 4. PasswordUtil.parseByte2HexStr(); 二进制到16进制
* 5. PasswordUtil.parseHexStr2Byte(); 16进制到2进制
*/
public class PasswordUtil {
/**
* 16进制的字符数组
*/
private final static String[] HEX_DIGITS = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"};
public static String passwordEncode(String source, String salt) {
return MD5(MD5(MD5(source, salt), salt));
}
public static String MD5(String source) {
return MD5Encode(source, "UTF-8", true);
}
public static String MD5(String source, String salt) {
return MD5Encode(source + salt, "UTF-8", true);
}
/**
* @param source 原字符串
* @param encoding 指定编码类型
* @param uppercase 是否转为大写字符串
*/
public static String MD5Encode(String source, String encoding, boolean uppercase) {
String result = null;
try {
result = source;
// 获得MD5摘要对象
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
// 使用指定的字节数组更新摘要信息
messageDigest.update(result.getBytes(encoding));
// messageDigest.digest()获得16位长度
// result = parseByte2HexStr(messageDigest.digest());
result = byteArrayToHexString(messageDigest.digest());
} catch (Exception e) {
e.printStackTrace();
}
return uppercase ? result.toUpperCase() : result;
}
/**
* AES 加密
*
* @param content 需要加密的内容
* @param aesKey 加密密钥
* @return
*/
public static byte[] AESEncrypt(String content, String aesKey) {
try {
KeyGenerator kgen = KeyGenerator.getInstance("AES");
kgen.init(128, new SecureRandom(aesKey.getBytes()));
SecretKey secretKey = kgen.generateKey();
byte[] enCodeFormat = secretKey.getEncoded();
SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
Cipher cipher = Cipher.getInstance("AES");// 创建密码器
byte[] byteContent = content.getBytes("utf-8");
cipher.init(Cipher.ENCRYPT_MODE, key);// 初始化
byte[] result = cipher.doFinal(byteContent);
return result; // 加密
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
}
return null;
}
/**
* 解密
*
* @param content 待解密内容
* @param aesKey 解密密钥 秘miyao
* @return
*/
public static byte[] AESDecrypt(byte[] content, String aesKey) {
try {
KeyGenerator kgen = KeyGenerator.getInstance("AES");
kgen.init(128, new SecureRandom(aesKey.getBytes()));
SecretKey secretKey = kgen.generateKey();
byte[] enCodeFormat = secretKey.getEncoded();
SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
Cipher cipher = Cipher.getInstance("AES");// 创建密码器
cipher.init(Cipher.DECRYPT_MODE, key);// 初始化
byte[] result = cipher.doFinal(content);
return result; // 加密
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
}
return null;
}
/**
* 将二进制转换成16进制
*/
public static String parseByte2HexStr(byte buf[]) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < buf.length; i++) {
String hex = Integer.toHexString(buf[i] & 0xFF);
if (hex.length() == 1) {
hex = '0' + hex;
}
sb.append(hex.toUpperCase());
}
return sb.toString();
}
/**
* 将16进制转换为二进制
*/
public static byte[] parseHexStr2Byte(String hexStr) {
if (hexStr.length() < 1) {
return null;
}
byte[] result = new byte[hexStr.length() / 2];
for (int i = 0; i < hexStr.length() / 2; i++) {
int high = Integer.parseInt(hexStr.substring(i * 2, i * 2 + 1), 16);
int low = Integer.parseInt(hexStr.substring(i * 2 + 1, i * 2 + 2), 16);
result[i] = (byte) (high * 16 + low);
}
return result;
}
//byte转16进制
private static String byteArrayToHexString(byte[] bytes) {
StringBuilder stringBuilder = new StringBuilder();
for (byte tem : bytes) {
stringBuilder.append(byteToHexString(tem));
}
return stringBuilder.toString();
}
//16进制转byte[]
private static String byteToHexString(byte b) {
int n = b;
if (n < 0) {
n = 256 + n;
}
int d1 = n / 16;
int d2 = n % 16;
return HEX_DIGITS[d1] + HEX_DIGITS[d2];
}
}
package com.hs.admin.util;
import com.auth0.jwt.JWT;
import com.auth0.jwt.JWTVerifier;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.interfaces.DecodedJWT;
import com.hs.admin.base.CodeMessageEnum;
import com.hs.admin.base.HsRuntimeException;
import com.hs.admin.bean.User;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* @author xieheng
* @desc 使用token验证用户是否登录
**/
public class TokenUtils {
//设置过期时间
private static final long EXPIRE_DATE = 30 * 60 * 100000;
//token秘钥
private static final String TOKEN_SECRET = "HSfasfhuaUUHufguGuwu2020BQWE";
public static String token(String username, String password) {
String token;
try {
//过期时间
Date date = new Date(System.currentTimeMillis() + EXPIRE_DATE);
//秘钥及加密算法
Algorithm algorithm = Algorithm.HMAC256(TOKEN_SECRET);
//设置头部信息
Map<String, Object> header = new HashMap<>();
header.put("typ", "JWT");
header.put("alg", "HS256");
//携带username,password信息,生成签名
token = JWT.create()
.withHeader(header)
.withClaim("username", username)
.withClaim("password", password).withExpiresAt(date)
.sign(algorithm);
} catch (Exception e) {
e.printStackTrace();
return null;
}
return token;
}
public static User verify(String token) {
/**
* @desc 验证token,通过返回true
* @params [token]需要校验的串
**/
try {
Algorithm algorithm = Algorithm.HMAC256(TOKEN_SECRET);
JWTVerifier verifier = JWT.require(algorithm).build();
DecodedJWT jwt = verifier.verify(token);
String username = jwt.getClaim("username").asString();
String password = jwt.getClaim("password").asString();
return new User(username, password);
} catch (Exception e) {
throw new HsRuntimeException(CodeMessageEnum.REQUEST_ERROR.getCode(),"token错误");
}
}
public static void main(String[] args) {
String username = "zhangsan";
String password = "123";
String token = token(username, password);
User user = verify("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6IjEyMyIsImV4cCI6MTYyMDY0MTEzNywidXNlcm5hbWUiOiJ6aGFuZ3NhbiJ9.TIFCrGeFCzFiviwUUIS29hklA3fZDXTwb8EZwwb8JiQ1");
System.out.println(token);
}
}
\ No newline at end of file
spring.application.name=admin
server.port=8090
#mybatis
mybatis.mapperLocations=classpath:mapper/*.xml
logging.level.com.hs.admin.dao=debug
#spring.web.resources.static-locations=classpath:/static/
#db
spring.datasource.driver-class-name=org.sqlite.JDBC
spring.datasource.url=jdbc:sqlite::resource:static/sqlite/admin.db?date_string_format=yyyy-MM-dd HH:mm:ss
spring.datasource.username=
spring.datasource.password=
#spring.datasource.url=jdbc:mysql://localhost:3306/xh-test?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true
#spring.datasource.username=root
#spring.datasource.password=123456
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.hikari.read-only=false
#spring.datasource.hikari.connection-timeout=60000
#spring.datasource.hikari.idle-timeout=60000
#spring.datasource.hikari.validation-timeout=3000
#spring.datasource.hikari.max-lifetime=60000
#spring.datasource.hikari.login-timeout=5
#spring.datasource.hikari.maximum-pool-size=300
#spring.datasource.hikari.minimum-idle=10
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hs.admin.dao.JcbDao">
<resultMap id="BaseResultMap" type="com.hs.admin.bean.Jcb">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="jcb_id" jdbcType="INTEGER" property="jcbId"/>
<result column="db_name" jdbcType="VARCHAR" property="dbName"/>
<result column="db_pwd" jdbcType="VARCHAR" property="dbPwd"/>
<result column="db_username" jdbcType="VARCHAR" property="dbUsername"/>
<result column="host" jdbcType="VARCHAR" property="host"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="port" jdbcType="VARCHAR" property="port"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="state" jdbcType="INTEGER" property="state"/>
<result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>
<result column="type" jdbcType="INTEGER" property="type"/>
</resultMap>
<sql id="Base_Column_List">
id,jcb_id, db_name, db_pwd, db_username, `host`, `name`, port, remark, `state`, gmt_create,type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from jcb
where jcb_id = #{jcbId,jdbcType=INTEGER}
</select>
<select id="findAllByState" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from jcb where state=1 order by gmt_create desc
limit #{pageSize} offset #{index}
</select>
<select id="checkTask" resultType="java.lang.Integer">
select count(*)
from jcb j
left join sys_task st on j.jcb_id = st.jcb_id
where j.state = 1
and st.job_status = 1
and j.id = #{id}
</select>
<select id="getCount" resultType="java.lang.Integer">
select count(1)
from jcb
where jcb_id = #{jcbId}
and state = 1
</select>
<select id="getTotalCount" resultType="java.lang.Long">
select count(1)
from jcb
where state = 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete
from jcb
where jcb_id = #{jcbId,jdbcType=INTEGER}
</delete>
<update id="delJcb">
update jcb
set state=3
where state = 1
and id = #{id}
</update>
<insert id="insert" keyColumn="jcb_id" keyProperty="jcbId" parameterType="com.hs.admin.bean.Jcb"
useGeneratedKeys="true">
insert into jcb (jcb_id, db_name, db_pwd, db_username,
`host`, `name`, port, remark,
`state`, gmt_create, type)
values (#{jcbId}, #{dbName,jdbcType=VARCHAR}, #{dbPwd,jdbcType=VARCHAR}, #{dbUsername,jdbcType=VARCHAR},
#{host,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR},
#{state,jdbcType=INTEGER}, #{gmtCreate,jdbcType=TIMESTAMP}, #{type})
</insert>
<update id="updateById" parameterType="com.hs.admin.bean.Jcb">
update jcb
<set>
<if test="dbName != null">
db_name = #{dbName,jdbcType=VARCHAR},
</if>
<if test="dbPwd != null">
db_pwd = #{dbPwd,jdbcType=VARCHAR},
</if>
<if test="dbUsername != null">
db_username = #{dbUsername,jdbcType=VARCHAR},
</if>
<if test="host != null">
`host` = #{host,jdbcType=VARCHAR},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="port != null">
port = #{port,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="state != null">
`state` = #{state,jdbcType=INTEGER},
</if>
<if test="gmtCreate != null">
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
</if>
<if test="type != null">
type= #{type}
</if>
</set>
where id = #{id}
</update>
<update id="updateByPrimaryKey" parameterType="com.hs.admin.bean.Jcb">
update jcb
set db_name = #{dbName,jdbcType=VARCHAR},
db_pwd = #{dbPwd,jdbcType=VARCHAR},
db_username = #{dbUsername,jdbcType=VARCHAR},
`host` = #{host,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
port = #{port,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
`state` = #{state,jdbcType=INTEGER},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
type = #{type}
where id = #{id}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hs.admin.dao.SysTaskDao">
<resultMap id="BaseResultMap" type="com.hs.admin.bean.SysTask">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="jcb_id" jdbcType="INTEGER" property="jcbId"/>
<result column="job_name" jdbcType="VARCHAR" property="jobName"/>
<result column="content" jdbcType="VARCHAR" property="content"/>
<result column="cron_expression" jdbcType="VARCHAR" property="cronExpression"/>
<result column="bean_class" jdbcType="VARCHAR" property="beanClass"/>
<result column="job_status" jdbcType="INTEGER" property="jobStatus"/>
<result column="job_group" jdbcType="VARCHAR" property="jobGroup"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="type" jdbcType="INTEGER" property="type"/>
</resultMap>
<sql id="Base_Column_List">
id, jcb_id, job_name, content, cron_expression, bean_class, job_status, job_group,
create_time, update_time, `type`
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_task
where id = #{id,jdbcType=INTEGER}
</select>
<select id="findAllByCondition" resultType="java.util.Map">
select st.jcb_id jcbId,
st.job_name jobName,
st.content,
st.cron_expression cronExpression,
st.bean_class beanClass,
st.job_status jobStatus,
st.job_group jobGroup,
st.create_time createTime,
st.type,
j.name
from jcb j
left join sys_task st on j.jcb_id = st.jcb_id
where st.jcb_id = #{jcbId}
and st.job_status != 3
order by st.create_time desc
limit #{pageSize} offset #{index}
</select>
<select id="getTotalCount" resultType="java.lang.Long">
select count(1)
from jcb j
left join sys_task st on j.jcb_id = st.jcb_id
where st.jcb_id = #{jcbId}
and st.job_status != 3
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete
from sys_task
where id = #{id,jdbcType=INTEGER}
</delete>
<update id="delTaskById">
update sys_task
set job_status=3
where job_status!=3 and jcb_id = (select jcb_id from jcb where id = #{id} limit 1)
</update>
<update id="delTask">
update sys_task
set job_status=3
where id = #{taskId}
</update>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.hs.admin.bean.SysTask"
useGeneratedKeys="true">
insert into sys_task (jcb_id, job_name, content,
cron_expression, bean_class, job_status,
job_group, create_time, update_time,
`type`)
values (#{jcbId,jdbcType=VARCHAR}, #{jobName,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
#{cronExpression,jdbcType=VARCHAR}, #{beanClass,jdbcType=VARCHAR}, #{jobStatus,jdbcType=BOOLEAN},
#{jobGroup,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{type,jdbcType=BOOLEAN})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.hs.admin.bean.SysTask"
useGeneratedKeys="true">
insert into sys_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jcbId != null">
jcb_id,
</if>
<if test="jobName != null">
job_name,
</if>
<if test="content != null">
content,
</if>
<if test="cronExpression != null">
cron_expression,
</if>
<if test="beanClass != null">
bean_class,
</if>
<if test="jobStatus != null">
job_status,
</if>
<if test="jobGroup != null">
job_group,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="type != null">
`type`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jcbId != null">
#{jcbId,jdbcType=VARCHAR},
</if>
<if test="jobName != null">
#{jobName,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="cronExpression != null">
#{cronExpression,jdbcType=VARCHAR},
</if>
<if test="beanClass != null">
#{beanClass,jdbcType=VARCHAR},
</if>
<if test="jobStatus != null">
#{jobStatus,jdbcType=BOOLEAN},
</if>
<if test="jobGroup != null">
#{jobGroup,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="type != null">
#{type,jdbcType=BOOLEAN},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.hs.admin.bean.SysTask">
update sys_task
<set>
<if test="jcbId != null">
jcb_id = #{jcbId,jdbcType=VARCHAR},
</if>
<if test="jobName != null">
job_name = #{jobName,jdbcType=VARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="cronExpression != null">
cron_expression = #{cronExpression,jdbcType=VARCHAR},
</if>
<if test="beanClass != null">
bean_class = #{beanClass,jdbcType=VARCHAR},
</if>
<if test="jobStatus != null">
job_status = #{jobStatus,jdbcType=BOOLEAN},
</if>
<if test="jobGroup != null">
job_group = #{jobGroup,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="type != null">
`type` = #{type,jdbcType=BOOLEAN},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.hs.admin.bean.SysTask">
update sys_task
set jcb_id = #{jcbId,jdbcType=VARCHAR},
job_name = #{jobName,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
cron_expression = #{cronExpression,jdbcType=VARCHAR},
bean_class = #{beanClass,jdbcType=VARCHAR},
job_status = #{jobStatus,jdbcType=BOOLEAN},
job_group = #{jobGroup,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
`type` = #{type,jdbcType=BOOLEAN}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hs.admin.dao.UserDao">
<resultMap id="BaseResultMap" type="com.hs.admin.bean.User">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="user_name" jdbcType="VARCHAR" property="userName"/>
<result column="password" jdbcType="VARCHAR" property="password"/>
<result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>
<result column="gmt_modify" jdbcType="TIMESTAMP" property="gmtModify"/>
</resultMap>
<sql id="Base_Column_List">
id, user_name, `password`, gmt_create, gmt_modify
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from user
where id = #{id,jdbcType=INTEGER}
</select>
<select id="findByUserNameAndPassword" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from user where user_name=#{username} and password=#{password}
</select>
<select id="findUserList" resultType="java.util.Map">
select user_name username ,id from user
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete
from user
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.hs.admin.bean.User" useGeneratedKeys="true">
insert into user (user_name, `password`, gmt_create,
gmt_modify)
values (#{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP},
#{gmtModify,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.hs.admin.bean.User" useGeneratedKeys="true">
insert into user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userName != null">
user_name,
</if>
<if test="password != null">
`password`,
</if>
<if test="gmtCreate != null">
gmt_create,
</if>
<if test="gmtModify != null">
gmt_modify,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="gmtCreate != null">
#{gmtCreate,jdbcType=TIMESTAMP},
</if>
<if test="gmtModify != null">
#{gmtModify,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.hs.admin.bean.User">
update user
<set>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="password != null">
`password` = #{password,jdbcType=VARCHAR},
</if>
<if test="gmtCreate != null">
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
</if>
<if test="gmtModify != null">
gmt_modify = #{gmtModify,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.hs.admin.bean.User">
update user
set user_name = #{userName,jdbcType=VARCHAR},
`password` = #{password,jdbcType=VARCHAR},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modify = #{gmtModify,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
This diff is collapsed.
.handle-box[data-v-4091bd11]{margin-bottom:20px}.handle-input[data-v-4091bd11]{width:300px;display:inline-block}.table[data-v-4091bd11]{width:100%;font-size:14px}.mr10[data-v-4091bd11]{margin-right:10px}[data-v-4091bd11] .formcol{display:flex}[data-v-4091bd11] .formlable{min-width:140px;display:flex;justify-content:flex-end;align-items:center}.formlable.required[data-v-4091bd11]:before{content:"*";color:red}.inputcol[data-v-4091bd11]{margin:12px 0}.el-dialog__wrapper[data-v-4091bd11]{overflow:hidden;display:flex;align-items:center;justify-content:center}.el-dialog__wrapper[data-v-4091bd11] .el-dialog{margin:0!important}.formcancel[data-v-4091bd11],.submit[data-v-4091bd11]{width:70px;display:block;margin-top:22px;margin-bottom:22px}[data-v-4091bd11] .el-dialog__wrapper .el-dialog{max-height:80%;overflow:scroll}[data-v-4091bd11] .el-dialog__wrapper .el-dialog::-webkit-scrollbar{width:6px}[data-v-4091bd11] .el-dialog__wrapper .el-dialog::-webkit-scrollbar-thumb{background-color:#fff}[data-v-4091bd11] .el-dialog__wrapper .el-dialog .el-dialog__header{position:sticky;top:0;left:0;background-color:#fff;z-index:1002}.container[data-v-4091bd11],.el-dialog__wrapper[data-v-4091bd11] .el-dialog__body,.pagination[data-v-4091bd11] li,.pagination[data-v-4091bd11] span,.table[data-v-4091bd11],[data-v-4091bd11] .el-button,[data-v-4091bd11] input.el-input__inner{font-size:12px!important}.handle-input[data-v-4091bd11]{margin-top:4px;margin-bottom:4px}.inputcol[data-v-4091bd11]{width:200px}.handle-box[data-v-452ec523]{margin-bottom:20px}.handle-input[data-v-452ec523]{width:300px;display:inline-block}.table[data-v-452ec523]{width:100%;font-size:14px}.mr10[data-v-452ec523]{margin-right:10px}[data-v-452ec523] .formcol{display:flex}[data-v-452ec523] .formlable{min-width:140px;display:flex;justify-content:flex-end;align-items:center}.formlable.required[data-v-452ec523]:before{content:"*";color:red}.inputcol[data-v-452ec523]{margin:12px 0}.el-dialog__wrapper[data-v-452ec523]{overflow:hidden;display:flex;align-items:center;justify-content:center}.el-dialog__wrapper[data-v-452ec523] .el-dialog{margin:0!important}.formcancel[data-v-452ec523],.submit[data-v-452ec523]{width:70px;display:block;margin-top:22px;margin-bottom:22px}[data-v-452ec523] .el-dialog__wrapper .el-dialog{max-height:80%;overflow:scroll}[data-v-452ec523] .el-dialog__wrapper .el-dialog::-webkit-scrollbar{width:6px}[data-v-452ec523] .el-dialog__wrapper .el-dialog::-webkit-scrollbar-thumb{background-color:#fff}[data-v-452ec523] .el-dialog__wrapper .el-dialog .el-dialog__header{position:sticky;top:0;left:0;background-color:#fff;z-index:1002}.container[data-v-452ec523],.el-dialog__wrapper[data-v-452ec523] .el-dialog__body,.pagination[data-v-452ec523] li,.pagination[data-v-452ec523] span,.table[data-v-452ec523],[data-v-452ec523] .el-button,[data-v-452ec523] input.el-input__inner{font-size:12px!important}.handle-input[data-v-452ec523]{margin-top:4px;margin-bottom:4px}.el-table--fit[data-v-452ec523],.el-table[data-v-452ec523]{height:0;overflow-y:scroll}.el-table--fit[data-v-452ec523]::-webkit-scrollbar,.el-table[data-v-452ec523]::-webkit-scrollbar{width:6px}.el-table--fit[data-v-452ec523]::-webkit-scrollbar-thumb,.el-table[data-v-452ec523]::-webkit-scrollbar-thumb{background-color:silver;border-radius:6px}.card_item[data-v-452ec523]{width:22%;display:inline-block;margin:12px 1.4%;text-overflow:ellipsis}.card_row[data-v-452ec523]{margin:12px auto}.card_row[data-v-452ec523]:last-child{text-align:right}.el-table[data-v-452ec523]:before{display:none}
\ No newline at end of file
.handle-box[data-v-0de9a432]{margin-bottom:20px}.handle-input[data-v-0de9a432]{width:300px;display:inline-block}.table[data-v-0de9a432]{width:100%;font-size:14px}.mr10[data-v-0de9a432]{margin-right:10px}[data-v-0de9a432] .formcol{display:flex}[data-v-0de9a432] .formlable{min-width:140px;display:flex;justify-content:flex-end;align-items:center}.formlable.required[data-v-0de9a432]:before{content:"*";color:red}.inputcol[data-v-0de9a432]{margin:12px 0}.el-dialog__wrapper[data-v-0de9a432]{overflow:hidden;display:flex;align-items:center;justify-content:center}.el-dialog__wrapper[data-v-0de9a432] .el-dialog{margin:0!important}.formcancel[data-v-0de9a432],.submit[data-v-0de9a432]{width:70px;display:block;margin-top:22px;margin-bottom:22px}[data-v-0de9a432] .el-dialog__wrapper .el-dialog{max-height:80%;overflow:scroll}[data-v-0de9a432] .el-dialog__wrapper .el-dialog::-webkit-scrollbar{width:6px}[data-v-0de9a432] .el-dialog__wrapper .el-dialog::-webkit-scrollbar-thumb{background-color:#fff}[data-v-0de9a432] .el-dialog__wrapper .el-dialog .el-dialog__header{position:sticky;top:0;left:0;background-color:#fff;z-index:1002}.container[data-v-0de9a432],.el-dialog__wrapper[data-v-0de9a432] .el-dialog__body,.pagination[data-v-0de9a432] li,.pagination[data-v-0de9a432] span,.table[data-v-0de9a432],[data-v-0de9a432] .el-button,[data-v-0de9a432] input.el-input__inner{font-size:12px!important}.handle-input[data-v-0de9a432]{margin-top:4px;margin-bottom:4px}.handle-box[data-v-3f1b9bf2]{margin-bottom:20px}.handle-input[data-v-3f1b9bf2]{width:300px;display:inline-block}.table[data-v-3f1b9bf2]{width:100%;font-size:14px}.mr10[data-v-3f1b9bf2]{margin-right:10px}[data-v-3f1b9bf2] .formcol{display:flex}[data-v-3f1b9bf2] .formlable{min-width:140px;display:flex;justify-content:flex-end;align-items:center}.formlable.required[data-v-3f1b9bf2]:before{content:"*";color:red}.inputcol[data-v-3f1b9bf2]{margin:12px 0}.el-dialog__wrapper[data-v-3f1b9bf2]{overflow:hidden;display:flex;align-items:center;justify-content:center}.el-dialog__wrapper[data-v-3f1b9bf2] .el-dialog{margin:0!important}.formcancel[data-v-3f1b9bf2],.submit[data-v-3f1b9bf2]{width:70px;display:block;margin-top:22px;margin-bottom:22px}[data-v-3f1b9bf2] .el-dialog__wrapper .el-dialog{max-height:80%;overflow:scroll}[data-v-3f1b9bf2] .el-dialog__wrapper .el-dialog::-webkit-scrollbar{width:6px}[data-v-3f1b9bf2] .el-dialog__wrapper .el-dialog::-webkit-scrollbar-thumb{background-color:#fff}[data-v-3f1b9bf2] .el-dialog__wrapper .el-dialog .el-dialog__header{position:sticky;top:0;left:0;background-color:#fff;z-index:1002}.container[data-v-3f1b9bf2],.el-dialog__wrapper[data-v-3f1b9bf2] .el-dialog__body,.pagination[data-v-3f1b9bf2] li,.pagination[data-v-3f1b9bf2] span,.table[data-v-3f1b9bf2],[data-v-3f1b9bf2] .el-button,[data-v-3f1b9bf2] input.el-input__inner{font-size:12px!important}.handle-input[data-v-3f1b9bf2]{margin-top:4px;margin-bottom:4px}.el-table--fit[data-v-3f1b9bf2],.el-table[data-v-3f1b9bf2]{height:0;overflow-y:scroll}.el-table--fit[data-v-3f1b9bf2]::-webkit-scrollbar,.el-table[data-v-3f1b9bf2]::-webkit-scrollbar{width:6px}.el-table--fit[data-v-3f1b9bf2]::-webkit-scrollbar-thumb,.el-table[data-v-3f1b9bf2]::-webkit-scrollbar-thumb{background-color:silver;border-radius:6px}.card_item[data-v-3f1b9bf2]{width:22%;display:inline-block;margin:12px 1%;text-overflow:ellipsis}.card_row[data-v-3f1b9bf2]{margin:12px auto}.card_row[data-v-3f1b9bf2]:last-child{text-align:right}.el-table[data-v-3f1b9bf2]:before{display:none}
\ No newline at end of file
.handle-box[data-v-18a7d443]{margin-bottom:20px}.handle-input[data-v-18a7d443]{width:300px;display:inline-block}.table[data-v-18a7d443]{width:100%;font-size:14px}.mr10[data-v-18a7d443]{margin-right:10px}[data-v-18a7d443] .formcol{display:flex}[data-v-18a7d443] .formlable{min-width:140px;display:flex;justify-content:flex-end;align-items:center}.formlable.required[data-v-18a7d443]:before{content:"*";color:red}.inputcol[data-v-18a7d443]{margin:12px 0}.el-dialog__wrapper[data-v-18a7d443]{overflow:hidden;display:flex;align-items:center;justify-content:center}.el-dialog__wrapper[data-v-18a7d443] .el-dialog{margin:0!important}.formcancel[data-v-18a7d443],.submit[data-v-18a7d443]{width:70px;display:block;margin-top:22px;margin-bottom:22px}[data-v-18a7d443] .el-dialog__wrapper .el-dialog{max-height:80%;overflow:scroll}[data-v-18a7d443] .el-dialog__wrapper .el-dialog::-webkit-scrollbar{width:6px}[data-v-18a7d443] .el-dialog__wrapper .el-dialog::-webkit-scrollbar-thumb{background-color:#fff}[data-v-18a7d443] .el-dialog__wrapper .el-dialog .el-dialog__header{position:sticky;top:0;left:0;background-color:#fff;z-index:1002}.container[data-v-18a7d443],.el-dialog__wrapper[data-v-18a7d443] .el-dialog__body,.pagination[data-v-18a7d443] li,.pagination[data-v-18a7d443] span,.table[data-v-18a7d443],[data-v-18a7d443] .el-button,[data-v-18a7d443] input.el-input__inner{font-size:12px!important}.handle-input[data-v-18a7d443]{margin-top:4px;margin-bottom:4px}.form[data-v-18a7d443]{width:440px;height:96%;margin:0 auto;display:flex;flex-direction:column;justify-content:center}.formlable[data-v-18a7d443]{min-width:100px}.inputcol[data-v-18a7d443]{width:250px}
\ No newline at end of file
.handle-box[data-v-ab5d7a44]{margin-bottom:20px}.handle-input[data-v-ab5d7a44]{width:300px;display:inline-block}.table[data-v-ab5d7a44]{width:100%;font-size:14px}.mr10[data-v-ab5d7a44]{margin-right:10px}[data-v-ab5d7a44] .formcol{display:flex}[data-v-ab5d7a44] .formlable{min-width:140px;display:flex;justify-content:flex-end;align-items:center}.formlable.required[data-v-ab5d7a44]:before{content:"*";color:red}.inputcol[data-v-ab5d7a44]{margin:12px 0}.el-dialog__wrapper[data-v-ab5d7a44]{overflow:hidden;display:flex;align-items:center;justify-content:center}.el-dialog__wrapper[data-v-ab5d7a44] .el-dialog{margin:0!important}.formcancel[data-v-ab5d7a44],.submit[data-v-ab5d7a44]{width:70px;display:block;margin-top:22px;margin-bottom:22px}[data-v-ab5d7a44] .el-dialog__wrapper .el-dialog{max-height:80%;overflow:scroll}[data-v-ab5d7a44] .el-dialog__wrapper .el-dialog::-webkit-scrollbar{width:6px}[data-v-ab5d7a44] .el-dialog__wrapper .el-dialog::-webkit-scrollbar-thumb{background-color:#fff}[data-v-ab5d7a44] .el-dialog__wrapper .el-dialog .el-dialog__header{position:sticky;top:0;left:0;background-color:#fff;z-index:1002}.container[data-v-ab5d7a44],.el-dialog__wrapper[data-v-ab5d7a44] .el-dialog__body,.pagination[data-v-ab5d7a44] li,.pagination[data-v-ab5d7a44] span,.table[data-v-ab5d7a44],[data-v-ab5d7a44] .el-button,[data-v-ab5d7a44] input.el-input__inner{font-size:12px!important}.handle-input[data-v-ab5d7a44]{margin-top:4px;margin-bottom:4px}.handle-box[data-v-89e59398]{margin-bottom:20px}.handle-input[data-v-89e59398]{width:300px;display:inline-block}.table[data-v-89e59398]{width:100%;font-size:14px}.mr10[data-v-89e59398]{margin-right:10px}[data-v-89e59398] .formcol{display:flex}[data-v-89e59398] .formlable{min-width:140px;display:flex;justify-content:flex-end;align-items:center}.formlable.required[data-v-89e59398]:before{content:"*";color:red}.inputcol[data-v-89e59398]{margin:12px 0}.el-dialog__wrapper[data-v-89e59398]{overflow:hidden;display:flex;align-items:center;justify-content:center}.el-dialog__wrapper[data-v-89e59398] .el-dialog{margin:0!important}.formcancel[data-v-89e59398],.submit[data-v-89e59398]{width:70px;display:block;margin-top:22px;margin-bottom:22px}[data-v-89e59398] .el-dialog__wrapper .el-dialog{max-height:80%;overflow:scroll}[data-v-89e59398] .el-dialog__wrapper .el-dialog::-webkit-scrollbar{width:6px}[data-v-89e59398] .el-dialog__wrapper .el-dialog::-webkit-scrollbar-thumb{background-color:#fff}[data-v-89e59398] .el-dialog__wrapper .el-dialog .el-dialog__header{position:sticky;top:0;left:0;background-color:#fff;z-index:1002}.container[data-v-89e59398],.el-dialog__wrapper[data-v-89e59398] .el-dialog__body,.pagination[data-v-89e59398] li,.pagination[data-v-89e59398] span,.table[data-v-89e59398],[data-v-89e59398] .el-button,[data-v-89e59398] input.el-input__inner{font-size:12px!important}.handle-input[data-v-89e59398]{margin-top:4px;margin-bottom:4px}.form[data-v-89e59398]{height:400px}[data-v-89e59398] .formlable{align-items:flex-start!important;margin-top:22px}.handle-box[data-v-636ade32]{margin-bottom:20px}.handle-input[data-v-636ade32]{width:300px;display:inline-block}.table[data-v-636ade32]{width:100%;font-size:14px}.mr10[data-v-636ade32]{margin-right:10px}[data-v-636ade32] .formcol{display:flex}[data-v-636ade32] .formlable{min-width:140px;display:flex;justify-content:flex-end;align-items:center}.formlable.required[data-v-636ade32]:before{content:"*";color:red}.inputcol[data-v-636ade32]{margin:12px 0}.el-dialog__wrapper[data-v-636ade32]{overflow:hidden;display:flex;align-items:center;justify-content:center}.el-dialog__wrapper[data-v-636ade32] .el-dialog{margin:0!important}.formcancel[data-v-636ade32],.submit[data-v-636ade32]{width:70px;display:block;margin-top:22px;margin-bottom:22px}[data-v-636ade32] .el-dialog__wrapper .el-dialog{max-height:80%;overflow:scroll}[data-v-636ade32] .el-dialog__wrapper .el-dialog::-webkit-scrollbar{width:6px}[data-v-636ade32] .el-dialog__wrapper .el-dialog::-webkit-scrollbar-thumb{background-color:#fff}[data-v-636ade32] .el-dialog__wrapper .el-dialog .el-dialog__header{position:sticky;top:0;left:0;background-color:#fff;z-index:1002}.container[data-v-636ade32],.el-dialog__wrapper[data-v-636ade32] .el-dialog__body,.pagination[data-v-636ade32] li,.pagination[data-v-636ade32] span,.table[data-v-636ade32],[data-v-636ade32] .el-button,[data-v-636ade32] input.el-input__inner{font-size:12px!important}.handle-input[data-v-636ade32]{margin-top:4px;margin-bottom:4px}
\ No newline at end of file
.handle-box[data-v-140ae744]{margin-bottom:20px}.handle-input[data-v-140ae744]{width:300px;display:inline-block}.table[data-v-140ae744]{width:100%;font-size:14px}.mr10[data-v-140ae744]{margin-right:10px}[data-v-140ae744] .formcol{display:flex}[data-v-140ae744] .formlable{min-width:140px;display:flex;justify-content:flex-end;align-items:center}.formlable.required[data-v-140ae744]:before{content:"*";color:red}.inputcol[data-v-140ae744]{margin:12px 0}.el-dialog__wrapper[data-v-140ae744]{overflow:hidden;display:flex;align-items:center;justify-content:center}.el-dialog__wrapper[data-v-140ae744] .el-dialog{margin:0!important}.formcancel[data-v-140ae744],.submit[data-v-140ae744]{width:70px;display:block;margin-top:22px;margin-bottom:22px}[data-v-140ae744] .el-dialog__wrapper .el-dialog{max-height:80%;overflow:scroll}[data-v-140ae744] .el-dialog__wrapper .el-dialog::-webkit-scrollbar{width:6px}[data-v-140ae744] .el-dialog__wrapper .el-dialog::-webkit-scrollbar-thumb{background-color:#fff}[data-v-140ae744] .el-dialog__wrapper .el-dialog .el-dialog__header{position:sticky;top:0;left:0;background-color:#fff;z-index:1002}.container[data-v-140ae744],.el-dialog__wrapper[data-v-140ae744] .el-dialog__body,.pagination[data-v-140ae744] li,.pagination[data-v-140ae744] span,.table[data-v-140ae744],[data-v-140ae744] .el-button,[data-v-140ae744] input.el-input__inner{font-size:12px!important}.handle-input[data-v-140ae744]{margin-top:4px;margin-bottom:4px}.form[data-v-140ae744]{width:440px;height:96%;margin:0 auto;display:flex;flex-direction:column;justify-content:center}.formlable[data-v-140ae744]{min-width:100px}.inputcol[data-v-140ae744]{width:250px}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
.top[data-v-6fc4caef]{display:block;position:relative;height:60px;width:100%;background:#4691e5;font-size:12px;color:#fff}.top .logo-title[data-v-6fc4caef]{display:block;float:left;height:60px;margin-left:20px;line-height:60px;cursor:pointer;text-decoration:none;font-size:12px;white-space:nowrap}.top .logo-title img[data-v-6fc4caef]{display:block;margin:12px auto;height:32px}.top .logo-title .top[data-v-6fc4caef]{font-size:12px}.top .nav-list[data-v-6fc4caef]{float:left;height:60px}.top .nav-list .nav-content[data-v-6fc4caef]{box-sizing:border-box;height:60px;float:left;padding:10px 10px 10px 10px;font-size:12px;display:flex;align-items:center;cursor:pointer}.top .nav-list .lightup[data-v-6fc4caef],.top .nav-list .nav-content[data-v-6fc4caef]:hover{background-color:#316fd4}.top .nav-right[data-v-6fc4caef]{position:absolute;right:20px;height:60px;margin-right:10px}.top .nav-right .info[data-v-6fc4caef]{height:60px;line-height:60px;font-size:12px;font-weight:700}.top .nav-right .head-ico[data-v-6fc4caef]{float:right;line-height:56px}.top .nav-right .head-ico img[data-v-6fc4caef]{float:left;width:26px;height:26px;margin:15px 10px;vertical-align:center;border-radius:4px}.top .nav-right .operate[data-v-6fc4caef]{position:absolute;top:50px;right:-10px;background-color:#f8f8f8;border-radius:2px;border:1px solid #c3c3bf;z-index:9999}.top .nav-right ul[data-v-6fc4caef]{margin:0;padding:5px 0;border-radius:5px;width:130px;color:#000}.top .nav-right ul li[data-v-6fc4caef]{list-style:none;height:30px;width:100%;padding:10px 0;text-align:center;line-height:30px}.top .nav-right .head-ico:hover .operate li[data-v-6fc4caef]:hover{background-color:#ccc;cursor:pointer}.sidebar[data-v-8dfe1e22]{display:block;position:absolute;left:0;top:60px;bottom:0;overflow-y:scroll;border-right:.6px solid #dedede;z-index:1000;background-color:#f8f8f8}.sidebar>ul[data-v-8dfe1e22]{height:auto!important}.sidebar[data-v-8dfe1e22]::-webkit-scrollbar{width:0}.sidebar-el-menu[data-v-8dfe1e22]:not(.el-menu--collapse){width:200px}.sidebar>ul[data-v-8dfe1e22]{height:100%}[data-v-8dfe1e22] .sidebar-el-menu li,[data-v-8dfe1e22] .sidebar-el-menu span{font-size:12px!important}.sidebar[data-v-8dfe1e22] .el-submenu__title,.sidebar[data-v-8dfe1e22] .sidebar-el-menu,.sidebar[data-v-8dfe1e22] .sidebar-el-menu li{background-color:#f8f8f8!important}.sidebar[data-v-8dfe1e22] .el-submenu__title span,.sidebar[data-v-8dfe1e22] .sidebar-el-menu .el-submenu .el-menu li,.sidebar[data-v-8dfe1e22] .sidebar-el-menu li span,.sidebar[data-v-8dfe1e22] .sidebar-el-menu span{color:#000!important}.sidebar[data-v-8dfe1e22] .sidebar-el-menu .el-menu-item.is-active span,.sidebar[data-v-8dfe1e22] .sidebar-el-menu .el-submenu .el-menu li.is-active{color:#20a0ff!important}.el-menu-item.is-active i[data-v-8dfe1e22]{color:#909399}[data-v-8dfe1e22] .el-menu--collapse .el-submenu .el-submenu__title span{height:0;width:0;overflow:hidden;visibility:hidden;display:inline-block}[data-v-8dfe1e22] li.el-menu-item,li.el-submenu[data-v-8dfe1e22]{position:relative}[data-v-8dfe1e22] li.el-menu-item:after,[data-v-8dfe1e22] li.el-submenu:after{content:"";width:80%;height:1.2px;background-color:#dedede;position:absolute;bottom:0;left:0;right:0;margin:0 auto}[data-v-8dfe1e22] .el-submenu li.el-menu-item:after{display:none}.collapse-btn[data-v-8dfe1e22]{background-color:#ededed;border-bottom:.2px solid #dedede;height:40px;display:flex;justify-content:center;align-items:center;cursor:pointer}[data-v-8dfe1e22] .el-submenu__title:hover,[data-v-8dfe1e22] li.el-menu-item:hover{background-color:silver!important}[data-v-8dfe1e22] .iconfont{float:left;margin-right:5px;width:24px;font-size:18px;text-align:center}[data-v-8dfe1e22] .sidebar-el-menu.el-menu--collapse .el-submenu__icon-arrow{display:none}.el-menu--vertical .el-menu,.el-menu--vertical .el-menu li{background-color:#fff!important;color:#000!important}li.el-menu-item.is-active span{color:#20a0ff!important}.el-submenu__title:hover,li.el-menu-item:hover{background-color:silver!important}.tags{position:relative;height:40px;overflow:hidden;background:#fff;padding-right:120px;box-shadow:0 5px 10px #ddd}.tags ul{box-sizing:border-box;width:100%;height:100%}.tags-li{float:left;margin:0;font-size:12px;overflow:hidden;cursor:pointer;height:100%;background:#fff;padding:0 12px 0 12px;vertical-align:middle;color:#666;display:flex;align-items:center}.tags-li:not(.active):hover{background:#f8f8f8}.tags-li.active{box-sizing:border-box;border:none;border-bottom:2px solid #4691e5;background-color:transparent}.tags-li-title{float:left;max-width:80px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:5px;color:#666}.tags-li.active .tags-li-title{color:#4691e5}.tags-close-box{position:absolute;right:0;top:0;box-sizing:border-box;padding-top:1px;text-align:center;width:110px;height:30px;background:#fff;box-shadow:-3px 0 15px 3px rgba(0,0,0,.1);z-index:10}
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="jiaoseguanli" unicode="&#58952;" d="M691.712 268.064c-41.728 0-75.648-33.888-75.648-75.552s33.952-75.616 75.648-75.616 75.68 33.952 75.68 75.616-33.952 75.552-75.68 75.552z m0-112.256a36.704 36.704 0 0 0-36.672 36.672 36.704 36.704 0 0 0 73.344 0 36.672 36.672 0 0 0-36.672-36.672z m200.064 76.128c-2.848 15.008-12.48 24.736-24.8 24.736h-1.728a42.816 42.816 0 0 0-42.816 42.752c0 6.176 2.688 13.76 3.712 16.192 5.888 13.12 1.376 29.312-11.648 38.304l-50.08 27.712a34.016 34.016 0 0 1-36.608-7.296c-6.208-6.464-22.784-19.744-34.176-19.744-11.552 0-28.224 13.568-34.432 20.064a33.92 33.92 0 0 1-36.544 7.616l-0.96-0.384-50.976-28-1.184-0.736a30.944 30.944 0 0 1-10.592-37.44c0.416-0.928 3.808-9.248 3.808-16.32a42.88 42.88 0 0 0-42.88-42.752h-2.016c-12.064 0-21.664-9.76-24.512-24.736-0.448-2.24-4.224-23.008-4.224-39.744 0-16.672 3.776-37.44 4.224-39.744 2.848-14.944 12.448-24.64 24.8-24.64h1.696c23.616 0 42.88-19.2 42.88-42.816 0-6.112-2.72-13.76-3.744-16.192-5.888-13.12-1.376-29.248 11.584-38.24l49.152-27.36a33.376 33.376 0 0 1 36.832 7.68c6.048 6.56 23.264 20.928 34.976 20.928 11.904 0 28.864-14.368 35.264-21.312 5.92-6.528 15.072-10.464 24.384-10.464a31.776 31.776 0 0 1 13.632 3.136l49.696 27.36 1.184 0.8a30.848 30.848 0 0 1 10.56 37.376 49.856 49.856 0 0 0-3.776 16.32 42.88 42.88 0 0 0 42.816 42.816h2.016c12.064 0 21.696 9.696 24.512 24.64-0.032 0.192 4.192 22.176 4.192 39.744 0 16.736-3.808 37.504-4.224 39.744z m-37.248-65.888a81.696 81.696 0 0 1-71.104-81.056c0-9.504 2.304-18.56 4.352-24.736l-35.872-19.744c-3.2 3.2-8.352 7.808-14.72 12.576-15.872 11.744-31.232 17.76-45.664 17.76-14.272 0-29.504-5.888-45.248-17.376a147.328 147.328 0 0 1-14.656-12.384l-34.272 19.136c2.048 6.176 4.384 15.328 4.384 24.8a81.696 81.696 0 0 1-71.104 81.056 191.808 191.808 0 0 0-2.464 26.112c0 8.672 1.44 19.488 2.464 26.176a81.792 81.792 0 0 1 71.104 81.056c0 9.504-2.304 18.56-4.352 24.736l37.024 20.32c3.2-3.072 8.352-7.616 14.656-12.128 15.552-11.136 30.528-16.672 44.576-16.672 13.856 0 28.672 5.504 44.128 16.384 6.272 4.384 11.36 8.8 14.592 11.808l35.456-19.68a80.32 80.32 0 0 1-4.384-24.736c0-41.312 30.752-75.744 71.104-81.056 1.056-6.752 2.464-17.632 2.464-26.176s-1.408-19.424-2.464-26.176zM178.56 55.36v42.816c0 145.632 112.384 265.568 255.488 279.072l-0.064 0.064h0.384c8.768 0.8 17.664 1.28 26.656 1.28l4.032-0.096c31.648 2.432 79.52 9.888 104.576 32.192l12.288 9.568c47.84 37.376 75.328 93.12 75.328 153.056C657.216 680.672 569.184 768 460.96 768c-108.192 0-196.224-87.328-196.224-194.688 0-59.936 27.424-115.68 75.328-153.056l12.256-9.568-14.432-5.696C210.368 354.4 128 233.984 128 98.176v-67.872c0-13.76 11.328-24.992 25.28-24.992h369.472a255.776 255.776 0 0 0-30.56 50.048H178.56z m136.768 517.952c0 79.712 65.344 144.608 145.664 144.608 80.352 0 145.696-64.832 145.696-144.608s-65.344-144.64-145.696-144.64c-80.32 0-145.664 64.896-145.664 144.64z" horiz-adv-x="1024" />
<glyph glyph-name="_caidanguanli" unicode="&#58892;" d="M882.1 237.5l-18.4 4.6c-3.8 14.2-9.4 27.6-16.6 40l9.8 16.3c3 5.8 5 13.1 0 18l-36.1 36.1c-2.2 2.2-5 3.1-7.9 3.1-3.5 0-7.1-1.3-10.2-3.1l-16.4-9.8c-12.4 7.1-25.7 12.7-39.9 16.5l-4.6 18.6c-2 6.2-5.7 12.7-12.7 12.7h-51c-7 0-11.2-6.5-12.7-12.7l-4.6-18.6c-14.1-3.8-27.5-9.4-39.9-16.5l-16.4 9.8c-3 1.8-6.7 3.1-10.2 3.1-2.9 0-5.6-0.9-7.9-3.1l-36.1-36.1c-5-5-3-12.2 0-18l9.8-16.3c-7.2-12.4-12.8-25.8-16.6-40l-18.4-4.6c-6.2-1.6-12.7-5.7-12.7-12.7v-51c0-7 6.5-10.8 12.7-12.7l18.4-4.6c3.8-14.2 9.4-27.6 16.6-40l-9.8-16.3c-3.3-5.5-5-13 0-18l36.1-36.1c2.2-2.2 4.8-3 7.6-3 3.5 0 7.2 1.4 10.4 3l16.4 9.8c12.4-7.1 25.7-12.7 39.9-16.5l4.6-18.6c1.6-6.2 5.7-12.7 12.7-12.7h51c7 0 10.8 6.5 12.7 12.7l4.6 18.6c14.1 3.8 27.5 9.4 39.9 16.5l16.4-9.8c3.3-1.7 7-3 10.4-3 2.8 0 5.4 0.8 7.6 3l36.1 36.1c5 5 3.3 12.5 0 18l-9.8 16.3c7.2 12.4 12.8 25.8 16.6 40l18.4 4.6c6.2 2 12.7 5.7 12.7 12.7v51c0.3 7-6.2 11.1-12.5 12.7z m-4.6-59.7c-0.1 0-0.1-0.1-0.2-0.1l-17.8-4.5c-6.1-1.5-10.9-6.3-12.6-12.4-3.4-12.5-8.4-24.5-14.9-35.8-3.2-5.5-3.1-12.2 0.1-17.7l9.6-15.9-30.4-30.4c-0.1 0-0.1 0.1-0.2 0.1l-15.9 9.5c-2.8 1.7-5.8 2.5-8.9 2.5-3 0-6-0.8-8.7-2.3-11.2-6.5-23.2-11.5-35.7-14.8-6.1-1.6-10.8-6.4-12.4-12.6l-4.5-17.9c0-0.1 0-0.1-0.1-0.2h-43l-4.5 18.1c-1.5 6.1-6.3 10.9-12.4 12.6-12.4 3.3-24.4 8.3-35.7 14.8-2.7 1.6-5.7 2.3-8.7 2.3-3.1 0-6.2-0.8-8.9-2.5l-15.9-9.5c-0.1 0-0.1-0.1-0.2-0.1l-30.4 30.4 9.6 16c3.3 5.4 3.3 12.2 0.1 17.7-6.5 11.2-11.5 23.3-14.9 35.8-1.6 6.1-6.5 10.8-12.6 12.4l-17.8 4.5c-0.1 0-0.1 0-0.2 0.1v43l18 4.5c6.1 1.5 10.9 6.3 12.6 12.4 3.3 12.5 8.4 24.5 14.9 35.8 3.2 5.5 3.1 12.2-0.1 17.7l-9.5 15.8c0 0.1-0.1 0.1-0.1 0.2l30.4 30.4 16-9.6c2.8-1.6 5.8-2.5 8.9-2.5 3 0 6 0.8 8.7 2.3 11.2 6.5 23.2 11.5 35.7 14.8 6.1 1.6 10.8 6.5 12.4 12.6l4.5 18.1h43c0-0.1 0-0.1 0.1-0.2l4.5-17.9c1.5-6.1 6.3-10.9 12.4-12.6 12.4-3.3 24.4-8.3 35.7-14.8 2.7-1.6 5.7-2.3 8.7-2.3 3.1 0 6.2 0.8 8.9 2.5l16.1 9.6 30.4-30.4c0-0.1-0.1-0.1-0.1-0.2l-9.5-15.8c-3.3-5.4-3.3-12.2-0.1-17.7 6.5-11.2 11.5-23.3 14.9-35.8 1.6-6.1 6.4-10.8 12.6-12.4l18-4.5v-43.1zM703.6 286.2c-48 0-86.9-38.9-86.9-86.9 0-48 38.9-86.9 86.9-86.9 48 0 86.9 38.9 86.9 86.9 0.1 48-38.9 86.9-86.9 86.9z m0-156.5c-38.4 0-69.5 31.1-69.5 69.5s31.1 69.5 69.5 69.5 69.5-31.1 69.5-69.5-31.1-69.5-69.5-69.5zM390 422.7H204.2c-43.5 0-78.9 35.4-78.9 78.9V687.4c0 43.5 35.4 78.9 78.9 78.9H390c43.5 0 78.9-35.4 78.9-78.9v-185.9c0-43.4-35.4-78.8-78.9-78.8zM204.2 726.3c-21.4 0-38.9-17.4-38.9-38.9v-185.9c0-21.4 17.5-38.9 38.9-38.9H390c21.4 0 38.9 17.4 38.9 38.9V687.4c0 21.4-17.5 38.9-38.9 38.9H204.2zM390 9.1H204.2c-43.5 0-78.9 35.4-78.9 78.9V273.8c0 43.5 35.4 78.9 78.9 78.9H390c43.5 0 78.9-35.4 78.9-78.9V88c0-43.5-35.4-78.9-78.9-78.9zM204.2 312.7c-21.4 0-38.9-17.5-38.9-38.9V88c0-21.4 17.5-38.9 38.9-38.9H390c21.4 0 38.9 17.5 38.9 38.9V273.8c0 21.4-17.5 38.9-38.9 38.9H204.2zM817 711H557c-11 0-20 9-20 20s9 20 20 20h260c11 0 20-9 20-20s-9-20-20-20z m0-227H557c-11 0-20 9-20 20s9 20 20 20h260c11 0 20-9 20-20s-9-20-20-20z" horiz-adv-x="1024" />
<glyph glyph-name="jiaoseguanli_huaban1" unicode="&#58929;" d="M536.1664 343.94112c64.79872 39.03488 108.01152 108.42112 108.01152 186.49088 0 121.4464-99.36896 221.184-220.3648 221.184-120.99584 0-229.00736-99.7376-229.00736-221.184 0-78.06976 43.2128-147.456 108.01152-186.49088-116.65408-43.37664-198.73792-156.13952-198.73792-290.57024 0-21.66784 17.28512-39.03488 38.87104-39.03488 21.58592 0 38.87104 17.36704 38.87104 39.03488 0 130.08896 108.01152 238.51008 237.60896 238.51008 133.9392 0 237.64992-108.42112 237.64992-238.51008 0-21.66784 17.28512-39.03488 38.87104-39.03488 21.58592 0 38.87104 17.36704 38.87104 39.03488 0.08192 130.12992-82.00192 242.8928-198.656 290.57024z m-116.65408 39.03488c-82.08384 0-146.88256 65.04448-146.88256 147.456s64.79872 147.456 146.88256 147.456 146.88256-65.04448 146.88256-147.456-64.79872-147.456-146.88256-147.456zM741.45792 378.59328c59.31008 35.71712 98.83648 99.20512 98.83648 170.63936 0 99.49184-72.9088 183.00928-167.64928 199.43424v-69.8368c56.19712-16.13824 96.50176-67.46112 96.50176-129.59744s-40.30464-113.4592-96.50176-129.59744v-91.9552c103.6288-18.0224 179.48672-108.50304 179.48672-214.95808 0-19.82464 15.81056-35.71712 35.59424-35.71712s35.59424 15.89248 35.59424 35.71712c0 119.07072-75.12064 222.24896-181.8624 265.87136z" horiz-adv-x="1024" />
<glyph glyph-name="iconfront-" unicode="&#58890;" d="M426.4 409.1H149c-26.1 0-47.3 21.2-47.3 47.3V733.8c0 26.1 21.2 47.3 47.3 47.3h277.3c26.1 0 47.3-21.2 47.3-47.3v-277.3c0-26.1-21.2-47.4-47.2-47.4zM149 753c-10.6 0-19.3-8.6-19.3-19.3v-277.3c0-10.6 8.6-19.3 19.3-19.3h277.3c10.6 0 19.3 8.6 19.3 19.3V733.8c0 10.6-8.6 19.3-19.3 19.3H149zM875 409.1H597.6c-26.1 0-47.3 21.2-47.3 47.3V733.8c0 26.1 21.2 47.3 47.3 47.3H875c26.1 0 47.3-21.2 47.3-47.3v-277.3c-0.1-26.1-21.3-47.4-47.3-47.4zM597.6 753c-10.6 0-19.3-8.6-19.3-19.3v-277.3c0-10.6 8.6-19.3 19.3-19.3H875c10.6 0 19.3 8.6 19.3 19.3V733.8c0 10.6-8.6 19.3-19.3 19.3H597.6zM426.4-23.7H149c-26.1 0-47.3 21.2-47.3 47.3V300.9c0 26.1 21.2 47.3 47.3 47.3h277.3c26.1 0 47.3-21.2 47.3-47.3v-277.3c0-26.1-21.2-47.3-47.2-47.3zM149 320.2c-10.6 0-19.3-8.6-19.3-19.3v-277.3c0-10.6 8.6-19.3 19.3-19.3h277.3c10.6 0 19.3 8.6 19.3 19.3V300.9c0 10.6-8.6 19.3-19.3 19.3H149zM875-23.7H597.6c-26.1 0-47.3 21.2-47.3 47.3V300.9c0 26.1 21.2 47.3 47.3 47.3H875c26.1 0 47.3-21.2 47.3-47.3v-277.3c-0.1-26.1-21.3-47.3-47.3-47.3zM597.6 320.2c-10.6 0-19.3-8.6-19.3-19.3v-277.3c0-10.6 8.6-19.3 19.3-19.3H875c10.6 0 19.3 8.6 19.3 19.3V300.9c0 10.6-8.6 19.3-19.3 19.3H597.6z" horiz-adv-x="1024" />
<glyph glyph-name="gongneng" unicode="&#58884;" d="M920.722599 674.273474L558.794716 883.387362c-29.246698 16.816851-64.342735 16.816851-93.589432 0L103.277401 674.273474c-29.246698-16.816851-46.794716-47.525884-46.794716-81.159586v-418.227776c0-33.633702 17.548019-64.342735 46.794716-81.159586l362.65905-209.113888c29.246698-16.816851 64.342735-16.816851 93.589433 0l362.65905 209.113888c29.246698 16.816851 46.794716 47.525884 46.794716 81.159586V593.113888c-1.462335 33.633702-19.010353 64.342735-48.257051 81.159586z m-135.997144-182.79186l-248.596929-140.384149v-282.961799c-0.731167-14.623349-3.655837-25.59086-16.085684-28.51553-5.84934-3.655837-11.698679-5.118172-18.279186-5.118172h-2.92467a35.096037 35.096037 0 0 0-35.096037 35.096037V359.140307c0 2.193502 0 4.387005 0.731167 6.580507L242.199215 491.481614c-16.816851 9.505177-26.322028 30.709032-16.816852 47.525883 9.505177 16.816851 29.246698 22.666191 45.332382 13.161014l242.016422-140.384148 242.747591 140.384148c16.816851 9.505177 35.096037 3.655837 44.601213-13.161014 9.505177-16.085684 1.462335-38.020707-15.354516-47.525883z" horiz-adv-x="1024" />
</font>
</defs></svg>
This diff is collapsed.
This diff is collapsed.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0baaed"],{"37f9":function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div")},c=[],u={},r=u,s=t("5d22"),d=Object(s["a"])(r,a,c,!1,null,"65b0f5ac",null);n["default"]=d.exports}}]);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-960b7570"],{"1ff4":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"form"},[n("el-row",{staticClass:"formrow"},[n("el-col",{staticClass:"formcol",attrs:{span:24}},[n("div",{staticClass:"formlable"},[e._v("头像:")]),n("img",{ref:"headImg",staticClass:"inputcol",staticStyle:{width:"60px",height:"60px","border-radius":"4px","margin-left":"60px"},attrs:{src:e.userinfo.avatar,title:"点击修改头像"},on:{click:e.upFile}}),n("input",{ref:"file",staticStyle:{display:"none"},attrs:{type:"file"}})])],1),n("el-row",{staticClass:"formrow"},[n("el-col",{staticClass:"formcol",attrs:{span:24}},[n("div",{class:e.detail?"formlable":"formlable required"},[e._v("用户名:")]),n("el-input",{staticClass:"inputcol",attrs:{placeholder:e.detail?"":"请输入用户名",disabled:e.detail},model:{value:e.userinfo.name,callback:function(t){e.$set(e.userinfo,"name",t)},expression:"userinfo.name"}})],1)],1),n("el-row",{staticClass:"formrow"},[n("el-col",{staticClass:"formcol",attrs:{span:24}},[n("div",{staticClass:"formlable"},[e._v("手机号:")]),n("el-input",{staticClass:"inputcol",attrs:{disabled:!0},model:{value:e.userinfo.phone,callback:function(t){e.$set(e.userinfo,"phone",t)},expression:"userinfo.phone"}})],1)],1),n("el-row",{staticClass:"formrow"},[n("el-col",{staticClass:"formcol",attrs:{span:24}},[n("div",{staticClass:"formlable"},[e._v("角色:")]),n("el-input",{staticClass:"inputcol",attrs:{disabled:!0},model:{value:e.userinfo.roleName,callback:function(t){e.$set(e.userinfo,"roleName",t)},expression:"userinfo.roleName"}})],1)],1),n("el-row",{staticClass:"formrow"},[n("el-col",{staticClass:"formcol",attrs:{span:24}},[n("div",{staticClass:"formlable"},[e._v("部门:")]),n("el-input",{staticClass:"inputcol",attrs:{disabled:!0},model:{value:e.userinfo.depName,callback:function(t){e.$set(e.userinfo,"depName",t)},expression:"userinfo.depName"}})],1)],1),n("el-row",{staticClass:"formrow"},[n("el-col",{staticClass:"formcol",attrs:{span:24}},[n("div",{staticClass:"formlable"},[e._v("登录时间:")]),n("el-input",{staticClass:"inputcol",attrs:{disabled:!0},model:{value:e.userinfo.loginTime,callback:function(t){e.$set(e.userinfo,"loginTime",t)},expression:"userinfo.loginTime"}})],1)],1),n("el-row",{staticClass:"formrow"},[n("el-col",{staticClass:"formcol",attrs:{span:24}},[n("div",{staticClass:"formlable"},[e._v("登录IP:")]),n("el-input",{staticClass:"inputcol",attrs:{disabled:!0},model:{value:e.userinfo.loginIp,callback:function(t){e.$set(e.userinfo,"loginIp",t)},expression:"userinfo.loginIp"}})],1)],1),n("el-row",{staticClass:"formrow"},[n("el-col",{staticClass:"formcol",attrs:{span:24}},[n("div",{staticClass:"formlable"}),e.detail?n("el-button",{staticClass:"formcancel",attrs:{type:"primary"},on:{click:function(t){e.detail=!1}}},[e._v("修改")]):e._e(),e.detail?e._e():n("el-button",{staticClass:"submit",attrs:{type:"primary"},on:{click:e.formsubmit}},[e._v("确定")]),e.detail?e._e():n("el-button",{staticClass:"formcancel",attrs:{type:"primary"},on:{click:e.formcancel}},[e._v("取消")])],1)],1)],1)},r=[],s=(n("a450"),n("6a61"),n("4833")),a=n("c20c"),o=n("b775");function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(o["a"])({url:"/upload/image",method:"POST",headers:{"Content-Type":"multipart/form-data"},data:e})}var l=n("5464"),u=n("2763"),d={data:function(){return{detail:!0,userinfo:this.$store.state.user.userinfo,changEvenTime:0}},methods:{init:function(){},formsubmit:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.updateUsernameService();case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),formcancel:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.detail=!0,e.next=3,this.refUserinfo();case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),formRefresh:function(e){var t=e.msg,n=void 0===t?"":t;n&&this.$nextTick((function(){Object(u["Message"])({message:n,type:"error",duration:2e3})}))},upFile:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.$refs.file.click(),0==this.changEvenTime){e.next=5;break}return e.abrupt("return");case 5:this.changEvenTime=1;case 6:this.$refs.file.addEventListener("change",Object(s["a"])(regeneratorRuntime.mark((function e(){var n,i,r,s,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.$refs,n=t.$refs.file.files,i=new FormData,i.append("file",n[0]),e.next=6,c(i);case 6:if(r=e.sent,200!=r.code){e.next=15;break}return s=Object(l["a"])(r.data),e.next=11,Object(a["b"])({id:t.userinfo.id,avatar:s});case 11:if(o=e.sent,200!=o.code){e.next=15;break}return e.next=15,t.refUserinfo();case 15:case"end":return e.stop()}}),e)}))));case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),refUserinfo:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(a["a"])();case 2:t=e.sent,200==t.code&&(n=t.data,this.$store.commit("user/set_userinfo",n),this.userinfo=n);case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),updateUsernameService:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this.updateUsernameModel(),!t.success){e.next=9;break}return e.next=4,Object(a["d"])(t.data);case 4:n=e.sent,200==n.code?Object(u["Message"])({message:"修改成功",type:"success",duration:2e3}):Object(u["Message"])({message:n.msg||"修改失败,请从重新尝试!",type:"error",duration:2e3}),this.formcancel(),e.next=10;break;case 9:this.formRefresh({msg:t.msg});case 10:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),updateUsernameModel:function(e){var t={name:this.userinfo.name,id:this.userinfo.id};return Object(l["d"])({name:this.userinfo.name}).success?Object(l["c"])({data:t}):Object(l["b"])({msg:"必填项不能为空"})}},mounted:function(){},computed:{},watch:{}},f=d,p=(n("3dc8"),n("994a"),n("5d22")),m=Object(p["a"])(f,i,r,!1,null,"140ae744",null);t["default"]=m.exports},"2e0f":function(e,t,n){},"3dc8":function(e,t,n){"use strict";n("fd6d")},5464:function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a}));n("a450"),n("1222"),n("a3b6"),n("55ae"),n("1bc78"),n("fc02"),n("e680"),n("4057"),n("a18c"),n("f67f"),n("6a00");function i(e){if(null==e||void 0==e)return{success:!1};if(e instanceof Object)for(var t in e){if(null==e[t]||void 0==e[t])return{success:!1};if(!e[t].toString())return{success:!1}}else if(!e.toString())return{success:!1};return{success:!0}}function r(e){var t=e.data,n=void 0===t?{}:t,i=e.msg,r=void 0===i?"":i;return{success:!0,data:n,msg:r}}function s(e){var t=e.data,n=void 0===t?{}:t,i=e.msg,r=void 0===i?"":i;return{success:!1,data:n,msg:r}}function a(e){var t=e.split("/"),n="";return t.forEach((function(e,t){t>2&&(n=n+"/"+e)})),n}},"994a":function(e,t,n){"use strict";n("2e0f")},c20c:function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o}));var i=n("b775");function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(i["a"])({url:"/admin/update",method:"POST",data:e})}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(i["a"])({url:"/api/admin/editPassword",method:"PUT",data:e})}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(i["a"])({url:"/admin/updateAvatar",method:"POST",data:e})}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(i["a"])({url:"/admin/getByCurr",method:"POST",data:e})}},f67f:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i=[{icon:"el-icon-s-home",index:"/index",title:"系统首页",topbar:0},{icon:"el-icon-user-solid",index:"/role",title:"用户角色",topbar:0},{icon:"el-icon-user-solid",index:"/department",title:"部门管理",topbar:0},{icon:"el-icon-office-building",title:"产品管理",index:"proManage",topbar:0,subs:[{icon:"el-icon-user-solid",index:"/proClass",title:"产品分类",topbar:0},{icon:"el-icon-user-solid",index:"/proManage",title:"产品管理",topbar:0}]},{icon:"el-icon-office-building",title:"跟单管理",index:"listManage",topbar:0,subs:[{icon:"el-icon-user-solid",index:"/basisModel",title:"基础模型管理",topbar:0},{icon:"el-icon-user-solid",index:"/listModel",title:"跟单模型管理",topbar:0},{icon:"el-icon-user-solid",index:"/proModel",title:"生产模型管理",topbar:0}]},{icon:"el-icon-user-solid",index:"/factory",title:"工厂管理",topbar:0},{icon:"el-icon-office-building",title:"订单管理",index:"orderManage",topbar:0,subs:[{icon:"el-icon-user-solid",index:"/order",title:"订单配置",topbar:0},{icon:"el-icon-user-solid",index:"/orderWatch",title:"订单监控",topbar:0}]},{icon:"el-icon-office-building",title:"消息管理",index:"messageManage",topbar:0,subs:[{icon:"el-icon-user-solid",index:"/messageTpl",title:"消息模板",topbar:0},{icon:"el-icon-user-solid",index:"/message",title:"消息列表",topbar:0}]},{icon:"el-icon-user-solid",index:"/personnel",title:"用户管理",topbar:0},{icon:"el-icon-user-solid",index:"/menu",title:"菜单管理",topbar:0},{icon:"el-icon-user-solid",index:"/companyInfo",title:"公司信息",topbar:0}]},fd6d:function(e,t,n){}}]);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["login"],{"50aa":function(e,t){function r(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function n(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&r(e.slice(0,0))}
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(e){return null!=e&&(r(e)||n(e)||!!e._isBuffer)}},"5c53":function(e,t){var r={utf8:{stringToBytes:function(e){return r.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(r.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=r},"8a63":function(e,t,r){},"8ef3":function(e,t){(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],n=0;n<e.length;n+=3)for(var o=e[n]<<16|e[n+1]<<8|e[n+2],s=0;s<4;s++)8*n+6*s<=8*e.length?r.push(t.charAt(o>>>6*(3-s)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,o=0;n<e.length;o=++n%4)0!=o&&r.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(n))>>>6-2*o);return r}};e.exports=r})()},bdc9:function(e,t,r){(function(){var t=r("8ef3"),n=r("5c53").utf8,o=r("50aa"),s=r("5c53").bin,a=function(e,r){e.constructor==String?e=r&&"binary"===r.encoding?s.stringToBytes(e):n.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var i=t.bytesToWords(e),u=8*e.length,c=1732584193,l=-271733879,f=-1732584194,p=271733878,d=0;d<i.length;d++)i[d]=16711935&(i[d]<<8|i[d]>>>24)|4278255360&(i[d]<<24|i[d]>>>8);i[u>>>5]|=128<<u%32,i[14+(u+64>>>9<<4)]=u;var m=a._ff,g=a._gg,h=a._hh,v=a._ii;for(d=0;d<i.length;d+=16){var b=c,y=l,w=f,k=p;c=m(c,l,f,p,i[d+0],7,-680876936),p=m(p,c,l,f,i[d+1],12,-389564586),f=m(f,p,c,l,i[d+2],17,606105819),l=m(l,f,p,c,i[d+3],22,-1044525330),c=m(c,l,f,p,i[d+4],7,-176418897),p=m(p,c,l,f,i[d+5],12,1200080426),f=m(f,p,c,l,i[d+6],17,-1473231341),l=m(l,f,p,c,i[d+7],22,-45705983),c=m(c,l,f,p,i[d+8],7,1770035416),p=m(p,c,l,f,i[d+9],12,-1958414417),f=m(f,p,c,l,i[d+10],17,-42063),l=m(l,f,p,c,i[d+11],22,-1990404162),c=m(c,l,f,p,i[d+12],7,1804603682),p=m(p,c,l,f,i[d+13],12,-40341101),f=m(f,p,c,l,i[d+14],17,-1502002290),l=m(l,f,p,c,i[d+15],22,1236535329),c=g(c,l,f,p,i[d+1],5,-165796510),p=g(p,c,l,f,i[d+6],9,-1069501632),f=g(f,p,c,l,i[d+11],14,643717713),l=g(l,f,p,c,i[d+0],20,-373897302),c=g(c,l,f,p,i[d+5],5,-701558691),p=g(p,c,l,f,i[d+10],9,38016083),f=g(f,p,c,l,i[d+15],14,-660478335),l=g(l,f,p,c,i[d+4],20,-405537848),c=g(c,l,f,p,i[d+9],5,568446438),p=g(p,c,l,f,i[d+14],9,-1019803690),f=g(f,p,c,l,i[d+3],14,-187363961),l=g(l,f,p,c,i[d+8],20,1163531501),c=g(c,l,f,p,i[d+13],5,-1444681467),p=g(p,c,l,f,i[d+2],9,-51403784),f=g(f,p,c,l,i[d+7],14,1735328473),l=g(l,f,p,c,i[d+12],20,-1926607734),c=h(c,l,f,p,i[d+5],4,-378558),p=h(p,c,l,f,i[d+8],11,-2022574463),f=h(f,p,c,l,i[d+11],16,1839030562),l=h(l,f,p,c,i[d+14],23,-35309556),c=h(c,l,f,p,i[d+1],4,-1530992060),p=h(p,c,l,f,i[d+4],11,1272893353),f=h(f,p,c,l,i[d+7],16,-155497632),l=h(l,f,p,c,i[d+10],23,-1094730640),c=h(c,l,f,p,i[d+13],4,681279174),p=h(p,c,l,f,i[d+0],11,-358537222),f=h(f,p,c,l,i[d+3],16,-722521979),l=h(l,f,p,c,i[d+6],23,76029189),c=h(c,l,f,p,i[d+9],4,-640364487),p=h(p,c,l,f,i[d+12],11,-421815835),f=h(f,p,c,l,i[d+15],16,530742520),l=h(l,f,p,c,i[d+2],23,-995338651),c=v(c,l,f,p,i[d+0],6,-198630844),p=v(p,c,l,f,i[d+7],10,1126891415),f=v(f,p,c,l,i[d+14],15,-1416354905),l=v(l,f,p,c,i[d+5],21,-57434055),c=v(c,l,f,p,i[d+12],6,1700485571),p=v(p,c,l,f,i[d+3],10,-1894986606),f=v(f,p,c,l,i[d+10],15,-1051523),l=v(l,f,p,c,i[d+1],21,-2054922799),c=v(c,l,f,p,i[d+8],6,1873313359),p=v(p,c,l,f,i[d+15],10,-30611744),f=v(f,p,c,l,i[d+6],15,-1560198380),l=v(l,f,p,c,i[d+13],21,1309151649),c=v(c,l,f,p,i[d+4],6,-145523070),p=v(p,c,l,f,i[d+11],10,-1120210379),f=v(f,p,c,l,i[d+2],15,718787259),l=v(l,f,p,c,i[d+9],21,-343485551),c=c+b>>>0,l=l+y>>>0,f=f+w>>>0,p=p+k>>>0}return t.endian([c,l,f,p])};a._ff=function(e,t,r,n,o,s,a){var i=e+(t&r|~t&n)+(o>>>0)+a;return(i<<s|i>>>32-s)+t},a._gg=function(e,t,r,n,o,s,a){var i=e+(t&n|r&~n)+(o>>>0)+a;return(i<<s|i>>>32-s)+t},a._hh=function(e,t,r,n,o,s,a){var i=e+(t^r^n)+(o>>>0)+a;return(i<<s|i>>>32-s)+t},a._ii=function(e,t,r,n,o,s,a){var i=e+(r^(t|~n))+(o>>>0)+a;return(i<<s|i>>>32-s)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,r){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var n=t.wordsToBytes(a(e,r));return r&&r.asBytes?n:r&&r.asString?s.bytesToString(n):t.bytesToHex(n)}})()},ede4:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login-wrap"},[r("div",{staticClass:"ms-login"},[r("div",{staticClass:"ms-title"},[e._v("\n HSCloud\n ")]),r("el-form",{ref:"login",staticClass:"ms-content",attrs:{model:e.param,rules:e.rules,"label-width":"0px"}},[r("el-form-item",{staticClass:"inputrow",attrs:{prop:"userName"}},[r("el-input",{attrs:{placeholder:"账号",autocomplete:"off"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.submitForm()}},model:{value:e.param.userName,callback:function(t){e.$set(e.param,"userName",t)},expression:"param.userName"}})],1),r("el-form-item",{staticClass:"inputrow",attrs:{prop:"password"}},[r("el-input",{attrs:{type:"password",placeholder:"密码"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.submitForm()}},model:{value:e.param.password,callback:function(t){e.$set(e.param,"password",t)},expression:"param.password"}})],1),r("el-form-item",{staticClass:"inputrow state"},[r("el-checkbox-group",{model:{value:e.keepwd,callback:function(t){e.keepwd=t},expression:"keepwd"}},[r("el-checkbox",{attrs:{label:!0}},[e._v("记住密码")])],1),r("div",{staticClass:"lastrow"})],1),r("div",{staticClass:"login-btn inputrow"},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm()}}},[e._v("立即登录")])],1)],1)],1)])},o=[],s=(r("4057"),r("6a61"),r("4833")),a=(r("bdc9"),r("7ded")),i={data:function(){return{param:{userName:"admin",password:"123456"},rules:{userName:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],valicode:[{required:!0,message:"请输入验证码",trigger:"blur"}]},keepwd:!0,autologin:!0,valicode:{time:0,src:""},getValicodeApi:Object(a["a"])()}},methods:{submitForm:function(){var e=this;this.$refs.login.validate(function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(r){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=15;break}return t.next=3,e.$store.dispatch("user/login",{username:e.param.userName,password:e.param.password});case 3:if(n=t.sent,!n.success){t.next=12;break}return e.keepwd?e.$store.commit("user/set_user_account",{username:e.param.userName,password:e.param.password}):e.$store.commit("user/reset_user_account"),t.next=8,e.$store.dispatch("root/setRoot");case 8:console.log("权限对象:",e.$store.state.root),e.$router.push({path:"/personnel"}),t.next=13;break;case 12:e.$message({message:"账号或密码错误!",type:"error",duration:2e3});case 13:t.next=16;break;case 15:return t.abrupt("return",!1);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},toRegister:function(){this.$router.push({path:"/register"})},getValicode:function(){this.getValicodeApi=Object(a["a"])()+"?time="+new Date},changeValicode:function(){var e=this;this.valicode.time>0&&setTimeout((function(){e.valicode.time=e.valicode.time-1,e.changeValicode()}),1e3)}},mounted:function(){var e=this.$router.currentRoute.params;(e.userName||"undefined"!=typeof e.userName&&e.userName.toString())&&(this.param.userName=e.userName,this.param.password=e.password)}},u=i,c=(r("feb9"),r("5d22")),l=Object(c["a"])(u,n,o,!1,null,"20ef3f6e",null);t["default"]=l.exports},feb9:function(e,t,r){"use strict";r("8a63")}}]);
\ No newline at end of file
/**
* 开发环境配置信息
*/
window.apiurl='';
\ No newline at end of file
/**
* 生产环境配置信息
*/
window.apiurl='';
\ No newline at end of file
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><title></title><link rel=icon type=image/png href=./logo.png><script src=./config/config.pro.js></script><link href=assets/css/chunk-28f026cb.f56aee47.css rel=prefetch><link href=assets/css/chunk-43c7bfcd.7e8048d0.css rel=prefetch><link href=assets/css/chunk-4a69c5b2.96e62ea0.css rel=prefetch><link href=assets/css/chunk-7eb22a7c.cd0a3386.css rel=prefetch><link href=assets/css/chunk-85c5c440.e08b36b5.css rel=prefetch><link href=assets/css/chunk-960b7570.f7204c3c.css rel=prefetch><link href=assets/css/home.b760c1b8.css rel=prefetch><link href=assets/css/login.5d8b150e.css rel=prefetch><link href=assets/js/chunk-28f026cb.b6534f5c.js rel=prefetch><link href=assets/js/chunk-2d0baaed.63c807a0.js rel=prefetch><link href=assets/js/chunk-43c7bfcd.923dd2ea.js rel=prefetch><link href=assets/js/chunk-4a69c5b2.e2350b14.js rel=prefetch><link href=assets/js/chunk-7eb22a7c.b12b3968.js rel=prefetch><link href=assets/js/chunk-85c5c440.b836c6fd.js rel=prefetch><link href=assets/js/chunk-960b7570.de4bfbcb.js rel=prefetch><link href=assets/js/home.58e3c6ff.js rel=prefetch><link href=assets/js/login.4b0121a0.js rel=prefetch><link href=assets/css/app.c6908504.css rel=preload as=style><link href=assets/css/chunk-vendors.b6fd5e62.css rel=preload as=style><link href=assets/js/app.982ea36e.js rel=preload as=script><link href=assets/js/chunk-vendors.3ce4c252.js rel=preload as=script><link href=assets/css/chunk-vendors.b6fd5e62.css rel=stylesheet><link href=assets/css/app.c6908504.css rel=stylesheet></head><body><noscript><strong>We're sorry but vms doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=assets/js/chunk-vendors.3ce4c252.js></script><script src=assets/js/app.982ea36e.js></script></body></html>
\ No newline at end of file
package com.hs.admin;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class AdminApplicationTests {
@Test
void contextLoads() {
}
}
package com.hs.admin;
import com.hs.admin.dto.UserDto;
import com.hs.admin.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@SpringBootTest
@RunWith(SpringRunner.class)
public class UserTest {
@Autowired
UserService userService;
@Test
public void save() {
UserDto dto = new UserDto();
dto.setUsername("admin");
dto.setPassword("123456");
userService.saveUser(dto);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment