档案代码提交

master
wangxy 4 months ago
commit 7525a8c4b5

33
.gitignore vendored

@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/

@ -0,0 +1,117 @@
/*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}

Binary file not shown.

@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

@ -0,0 +1,90 @@
## 平台简介
一直想做一款后台管理系统看了很多优秀的开源项目但是发现没有合适的。于是利用空闲休息时间开始自己写了一套后台系统。如此有了若依。她可以用于所有的Web应用程序如网站管理后台网站会员中心CMSCRMOA。所有前端后台代码封装过后十分精简易上手出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
性别男,若依是给女儿取的名字(寓意:你若不离不弃,我必生死相依)
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
* 前后端分离版本,请移步[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)  
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)  
## 内置功能
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
3. 岗位管理:配置系统用户所属担任职务。
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
7. 参数管理:对系统动态配置常用参数。
8. 通知公告:系统通知公告信息发布维护。
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
10. 登录日志:系统登录日志记录查询包含登录异常。
11. 在线用户:当前系统中活跃用户状态监控。
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
13. 代码生成前后端代码的生成java、html、xml、sql支持CRUD下载 。
14. 系统接口根据业务代码自动生成相关的api接口文档。
15. 服务监控监视当前系统CPU、内存、磁盘、堆栈等相关信息。
16. 缓存监控:对系统的缓存查询,删除、清空等操作。
17. 在线构建器拖动表单元素生成相应的HTML代码。
18. 连接池监视监视当前系统数据库连接池状态可进行分析SQL找出系统性能瓶颈。
## 在线体验
- admin/admin123
- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
演示地址http://ruoyi.vip
文档地址http://doc.ruoyi.vip
## 演示图
<table>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-42e518aa72a24d228427a1261cb3679f395.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-7f20dd0edba25e5187c5c4dd3ec7d3d9797.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-2dae3d87f6a8ca05057db059cd9a411d51d.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-ea4d98423471e55fba784694e45d12bd4bb.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-7f6c6e9f5873efca09bd2870ee8468b8fce.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-c708b65f2c382a03f69fe1efa8d341e6cff.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-9ab586c47dd5c7b92bca0d727962c90e3b8.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-ef954122a2080e02013112db21754b955c6.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-088edb4d531e122415a1e2342bccb1a9691.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-f886fe19bd820c0efae82f680223cac196c.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-c7a2eb71fa65d6e660294b4bccca613d638.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-e60137fb0787defe613bd83331dc4755a70.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-7c51c1b5758f0a0f92ed3c60469b7526f9f.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-15181aed45bb2461aa97b594cbf2f86ea5f.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-83326ad52ea63f67233d126226738054d98.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-3bd6d31e913b70df00107db51d64ef81df7.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-70a2225836bc82042a6785edf6299e2586a.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-0184d6ab01fdc6667a14327fcaf8b46345d.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-64d8086dc2c02c8f71170290482f7640098.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td>
</tr>
</table>
## 若依交流群
QQ群 [![加入QQ群](https://img.shields.io/badge/已满-1389287-blue.svg)](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [![加入QQ群](https://img.shields.io/badge/已满-1679294-blue.svg)](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [![加入QQ群](https://img.shields.io/badge/已满-1529866-blue.svg)](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [![加入QQ群](https://img.shields.io/badge/已满-1772718-blue.svg)](https://jq.qq.com/?_wv=1027&k=5g75dCU) [![加入QQ群](https://img.shields.io/badge/已满-1366522-blue.svg)](https://jq.qq.com/?_wv=1027&k=58cPoHA) [![加入QQ群](https://img.shields.io/badge/已满-1382251-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [![加入QQ群](https://img.shields.io/badge/已满-1145125-blue.svg)](https://jq.qq.com/?_wv=1027&k=5yugASz) [![加入QQ群](https://img.shields.io/badge/已满-86752435-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [![加入QQ群](https://img.shields.io/badge/已满-134072510-blue.svg)](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [![加入QQ群](https://img.shields.io/badge/已满-210336300-blue.svg)](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [![加入QQ群](https://img.shields.io/badge/已满-339522636-blue.svg)](https://jq.qq.com/?_wv=1027&k=5omzbKc) [![加入QQ群](https://img.shields.io/badge/已满-130035985-blue.svg)](https://jq.qq.com/?_wv=1027&k=qPIKBb7s) [![加入QQ群](https://img.shields.io/badge/已满-143151071-blue.svg)](https://jq.qq.com/?_wv=1027&k=4NsjKbtU) [![加入QQ群](https://img.shields.io/badge/已满-158781320-blue.svg)](https://jq.qq.com/?_wv=1027&k=VD2pkz2G) [![加入QQ群](https://img.shields.io/badge/已满-201531282-blue.svg)](https://jq.qq.com/?_wv=1027&k=HlshFwkJ) [![加入QQ群](https://img.shields.io/badge/已满-101526938-blue.svg)](https://jq.qq.com/?_wv=1027&k=0ARRrO9V) [![加入QQ群](https://img.shields.io/badge/264355400-blue.svg)](https://jq.qq.com/?_wv=1027&k=up9k3ZXJ)

Binary file not shown.

310
mvnw vendored

@ -0,0 +1,310 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Maven Start Up Batch script
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------
if [ -z "$MAVEN_SKIP_RC" ] ; then
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
export JAVA_HOME="`/usr/libexec/java_home`"
else
export JAVA_HOME="/Library/Java/Home"
fi
fi
;;
esac
if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
fi
fi
if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home
PRG="$0"
# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
saveddir=`pwd`
M2_HOME=`dirname "$PRG"`/..
# make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd`
cd "$saveddir"
# echo Using m2 at $M2_HOME
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
fi
if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`"
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
if $darwin ; then
javaHome="`dirname \"$javaExecutable\"`"
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
else
javaExecutable="`readlink -f \"$javaExecutable\"`"
fi
javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="`which java`"
fi
fi
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi
if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi
basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd`
fi
# end of workaround
done
echo "${basedir}"
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
echo "$(tr -s '\n' ' ' < "$1")"
fi
}
BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
exit 1;
fi
##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found .mvn/wrapper/maven-wrapper.jar"
fi
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
fi
if [ -n "$MVNW_REPOURL" ]; then
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
else
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
fi
while IFS="=" read key value; do
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
esac
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
if [ "$MVNW_VERBOSE" = true ]; then
echo "Downloading from: $jarUrl"
fi
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
if $cygwin; then
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
fi
if command -v wget > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found wget ... using wget"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
wget "$jarUrl" -O "$wrapperJarPath"
else
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
fi
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
curl -o "$wrapperJarPath" "$jarUrl" -f
else
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
fi
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download"
fi
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
javaClass=`cygpath --path --windows "$javaClass"`
fi
if [ -e "$javaClass" ]; then
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Compiling MavenWrapperDownloader.java ..."
fi
# Compiling the Java class
("$JAVA_HOME/bin/javac" "$javaClass")
fi
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
# Running the downloader
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Running MavenWrapperDownloader.java ..."
fi
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
fi
fi
fi
fi
##########################################################################################
# End of extension
##########################################################################################
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
echo $MAVEN_PROJECTBASEDIR
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi
# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

182
mvnw.cmd vendored

@ -0,0 +1,182 @@
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
if not "%MVNW_REPOURL%" == "" (
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%

@ -0,0 +1,424 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.archive</groupId>
<artifactId>archive</artifactId>
<version>4.6.0</version>
<packaging>jar</packaging>
<name>archive</name>
<url>http://www.archive.vip</url>
<description>档案管理系统</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.13.RELEASE</version>
<relativePath />
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<shiro.version>1.7.1</shiro.version>
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
<mybatis.spring.boot.starter.version>2.1.3</mybatis.spring.boot.starter.version>
<pagehelper.spring.boot.starter.version>1.3.0</pagehelper.spring.boot.starter.version>
<fastjson.version>1.2.75</fastjson.version>
<druid.version>1.2.4</druid.version>
<commons.io.version>2.5</commons.io.version>
<commons.fileupload.version>1.3.3</commons.fileupload.version>
<bitwalker.version>1.21</bitwalker.version>
<velocity.version>1.7</velocity.version>
<kaptcha.version>2.3.2</kaptcha.version>
<swagger.version>2.9.2</swagger.version>
<poi.version>4.1.2</poi.version>
<oshi.version>5.6.0</oshi.version>
<jna.version>5.7.0</jna.version>
</properties>
<dependencies>
<!-- SpringBoot 核心包 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!-- SpringBoot 测试 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- SpringBoot 拦截器 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!-- SpringBoot Web容器 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- SpringBoot集成thymeleaf模板 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- SpringBoot集成mybatis框架 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis.spring.boot.starter.version}</version>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.spring.boot.starter.version}</version>
</dependency>
<!-- tess4J OCR插件 -->
<dependency>
<groupId>net.sourceforge.tess4j</groupId>
<artifactId>tess4j</artifactId>
<version>4.1.1</version>
</dependency>
<!--阿里数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<!--常用工具类 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!--io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<!--文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
</dependency>
<!--Shiro核心框架 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>${shiro.version}</version>
</dependency>
<!-- Shiro使用Spring框架 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version>
</dependency>
<!-- Shiro使用EhCache缓存框架 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<version>${shiro.version}</version>
</dependency>
<!-- thymeleaf模板引擎和shiro框架的整合 -->
<dependency>
<groupId>com.github.theborakompanioni</groupId>
<artifactId>thymeleaf-extras-shiro</artifactId>
<version>${thymeleaf.extras.shiro.version}</version>
</dependency>
<!-- 阿里JSON解析器 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- 解析客户端操作系统、浏览器等 -->
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>${bitwalker.version}</version>
</dependency>
<!--Spring框架基本的核心工具-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<!-- 定时任务 -->
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<exclusions>
<exclusion>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--velocity代码生成使用模板 -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>${velocity.version}</version>
</dependency>
<!--验证码 -->
<dependency>
<groupId>com.github.penggle</groupId>
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
<exclusions>
<exclusion>
<artifactId>javax.servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- swagger2-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--防止进入swagger页面报类型转换错误排除2.9.2中的引用手动增加1.5.21版本-->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.21</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.5.21</version>
</dependency>
<!-- itext -->
<!-- <dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
</dependency> -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-asian</artifactId>
<version>5.2.0</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.10</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
<version>9.0.3</version>
</dependency>
<!--<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-cells</artifactId>
<version>21.8</version>
</dependency>-->
<dependency>
<groupId>com.luhuiguo</groupId>
<artifactId>aspose-cells</artifactId>
<version>22.4</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.20.0-GA</version>
</dependency>
<!-- 用来做ofd转换使用 ofdrw-converter-1.17.18.jar 下载不下来-->
<dependency>
<groupId>org.ofdrw</groupId>
<artifactId>ofdrw-converter</artifactId>
<version>1.17.18</version>
</dependency>
<!-- 开源中文分词器Ansj -->
<dependency>
<groupId>org.ansj</groupId>
<artifactId>ansj_seg</artifactId>
<version>5.1.6</version>
</dependency>
<!-- swagger2-UI-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- 获取系统信息 -->
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>${oshi.version}</version>
</dependency>
<!-- 获取文件元数据信息 与apache.poi有版本冲突不能随便换版本-->
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
<version>1.24.1</version>
</dependency>
<!-- 拼音转换 -->
<dependency>
<groupId>com.belerweb</groupId>
<artifactId>pinyin4j</artifactId>
<version>2.5.0</version>
</dependency>
<!-- excel工具 -->
<!--<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-full</artifactId>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.3.14</version>
<scope>compile</scope>
</dependency>
<!--<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>8.2.0</version>
</dependency>-->
<!-- sqlite驱动包 -->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork> <!-- 如果没有该配置devtools不会生效 -->
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>com.e-iceblue</id>
<url>https://repo.e-iceblue.cn/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<!-- excel转pdf-->
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>https://repository.aspose.com/repo/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

@ -0,0 +1,174 @@
DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
DROP TABLE IF EXISTS QRTZ_LOCKS;
DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
DROP TABLE IF EXISTS QRTZ_CALENDARS;
-- ----------------------------
-- 1、存储每一个已配置的 jobDetail 的详细信息
-- ----------------------------
create table QRTZ_JOB_DETAILS (
sched_name varchar(120) not null comment '调度名称',
job_name varchar(200) not null comment '任务名称',
job_group varchar(200) not null comment '任务组名',
description varchar(250) null comment '相关介绍',
job_class_name varchar(250) not null comment '执行任务类名称',
is_durable varchar(1) not null comment '是否持久化',
is_nonconcurrent varchar(1) not null comment '是否并发',
is_update_data varchar(1) not null comment '是否更新数据',
requests_recovery varchar(1) not null comment '是否接受恢复执行',
job_data blob null comment '存放持久化job对象',
primary key (sched_name, job_name, job_group)
) engine=innodb comment = '任务详细信息表';
-- ----------------------------
-- 2、 存储已配置的 Trigger 的信息
-- ----------------------------
create table QRTZ_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
trigger_name varchar(200) not null comment '触发器的名字',
trigger_group varchar(200) not null comment '触发器所属组的名字',
job_name varchar(200) not null comment 'qrtz_job_details表job_name的外键',
job_group varchar(200) not null comment 'qrtz_job_details表job_group的外键',
description varchar(250) null comment '相关介绍',
next_fire_time bigint(13) null comment '上一次触发时间(毫秒)',
prev_fire_time bigint(13) null comment '下一次触发时间(默认为-1表示不触发',
priority integer null comment '优先级',
trigger_state varchar(16) not null comment '触发器状态',
trigger_type varchar(8) not null comment '触发器的类型',
start_time bigint(13) not null comment '开始时间',
end_time bigint(13) null comment '结束时间',
calendar_name varchar(200) null comment '日程表名称',
misfire_instr smallint(2) null comment '补偿执行的策略',
job_data blob null comment '存放持久化job对象',
primary key (sched_name, trigger_name, trigger_group),
foreign key (sched_name, job_name, job_group) references QRTZ_JOB_DETAILS(sched_name, job_name, job_group)
) engine=innodb comment = '触发器详细信息表';
-- ----------------------------
-- 3、 存储简单的 Trigger包括重复次数间隔以及已触发的次数
-- ----------------------------
create table QRTZ_SIMPLE_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
repeat_count bigint(7) not null comment '重复的次数统计',
repeat_interval bigint(12) not null comment '重复的间隔时间',
times_triggered bigint(10) not null comment '已经触发的次数',
primary key (sched_name, trigger_name, trigger_group),
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = '简单触发器的信息表';
-- ----------------------------
-- 4、 存储 Cron Trigger包括 Cron 表达式和时区信息
-- ----------------------------
create table QRTZ_CRON_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
cron_expression varchar(200) not null comment 'cron表达式',
time_zone_id varchar(80) comment '时区',
primary key (sched_name, trigger_name, trigger_group),
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = 'Cron类型的触发器表';
-- ----------------------------
-- 5、 Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型JobStore 并不知道如何存储实例的时候)
-- ----------------------------
create table QRTZ_BLOB_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
blob_data blob null comment '存放持久化Trigger对象',
primary key (sched_name, trigger_name, trigger_group),
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = 'Blob类型的触发器表';
-- ----------------------------
-- 6、 以 Blob 类型存储存放日历信息, quartz可配置一个日历来指定一个时间范围
-- ----------------------------
create table QRTZ_CALENDARS (
sched_name varchar(120) not null comment '调度名称',
calendar_name varchar(200) not null comment '日历名称',
calendar blob not null comment '存放持久化calendar对象',
primary key (sched_name, calendar_name)
) engine=innodb comment = '日历信息表';
-- ----------------------------
-- 7、 存储已暂停的 Trigger 组的信息
-- ----------------------------
create table QRTZ_PAUSED_TRIGGER_GRPS (
sched_name varchar(120) not null comment '调度名称',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
primary key (sched_name, trigger_group)
) engine=innodb comment = '暂停的触发器表';
-- ----------------------------
-- 8、 存储与已触发的 Trigger 相关的状态信息,以及相联 Job 的执行信息
-- ----------------------------
create table QRTZ_FIRED_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
entry_id varchar(95) not null comment '调度器实例id',
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
instance_name varchar(200) not null comment '调度器实例名',
fired_time bigint(13) not null comment '触发的时间',
sched_time bigint(13) not null comment '定时器制定的时间',
priority integer not null comment '优先级',
state varchar(16) not null comment '状态',
job_name varchar(200) null comment '任务名称',
job_group varchar(200) null comment '任务组名',
is_nonconcurrent varchar(1) null comment '是否并发',
requests_recovery varchar(1) null comment '是否接受恢复执行',
primary key (sched_name, entry_id)
) engine=innodb comment = '已触发的触发器表';
-- ----------------------------
-- 9、 存储少量的有关 Scheduler 的状态信息,假如是用于集群中,可以看到其他的 Scheduler 实例
-- ----------------------------
create table QRTZ_SCHEDULER_STATE (
sched_name varchar(120) not null comment '调度名称',
instance_name varchar(200) not null comment '实例名称',
last_checkin_time bigint(13) not null comment '上次检查时间',
checkin_interval bigint(13) not null comment '检查间隔时间',
primary key (sched_name, instance_name)
) engine=innodb comment = '调度器状态表';
-- ----------------------------
-- 10、 存储程序的悲观锁的信息(假如使用了悲观锁)
-- ----------------------------
create table QRTZ_LOCKS (
sched_name varchar(120) not null comment '调度名称',
lock_name varchar(40) not null comment '悲观锁名称',
primary key (sched_name, lock_name)
) engine=innodb comment = '存储的悲观锁信息表';
-- ----------------------------
-- 11、 Quartz集群实现同步机制的行锁表
-- ----------------------------
create table QRTZ_SIMPROP_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
str_prop_1 varchar(512) null comment 'String类型的trigger的第一个参数',
str_prop_2 varchar(512) null comment 'String类型的trigger的第二个参数',
str_prop_3 varchar(512) null comment 'String类型的trigger的第三个参数',
int_prop_1 int null comment 'int类型的trigger的第一个参数',
int_prop_2 int null comment 'int类型的trigger的第二个参数',
long_prop_1 bigint null comment 'long类型的trigger的第一个参数',
long_prop_2 bigint null comment 'long类型的trigger的第二个参数',
dec_prop_1 numeric(13,4) null comment 'decimal类型的trigger的第一个参数',
dec_prop_2 numeric(13,4) null comment 'decimal类型的trigger的第二个参数',
bool_prop_1 varchar(1) null comment 'Boolean类型的trigger的第一个参数',
bool_prop_2 varchar(1) null comment 'Boolean类型的trigger的第二个参数',
primary key (sched_name, trigger_name, trigger_group),
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = '同步机制的行锁表';
commit;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,713 @@
-- ----------------------------
-- 1、部门表
-- ----------------------------
drop table if exists sys_dept;
create table sys_dept (
dept_id bigint(20) not null auto_increment comment '部门id',
parent_id bigint(20) default 0 comment '父部门id',
ancestors varchar(50) default '' comment '祖级列表',
dept_name varchar(30) default '' comment '部门名称',
order_num int(4) default 0 comment '显示顺序',
leader varchar(20) default null comment '负责人',
phone varchar(11) default null comment '联系电话',
email varchar(50) default null comment '邮箱',
status char(1) default '0' comment '部门状态0正常 1停用',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
primary key (dept_id)
) engine=innodb auto_increment=200 comment = '部门表';
-- ----------------------------
-- 初始化-部门表数据
-- ----------------------------
insert into sys_dept values(100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
-- ----------------------------
-- 2、用户信息表
-- ----------------------------
drop table if exists sys_user;
create table sys_user (
user_id bigint(20) not null auto_increment comment '用户ID',
dept_id bigint(20) default null comment '部门ID',
login_name varchar(30) not null comment '登录账号',
user_name varchar(30) default '' comment '用户昵称',
user_type varchar(2) default '00' comment '用户类型00系统用户 01注册用户',
email varchar(50) default '' comment '用户邮箱',
phonenumber varchar(11) default '' comment '手机号码',
sex char(1) default '0' comment '用户性别0男 1女 2未知',
avatar varchar(100) default '' comment '头像路径',
password varchar(50) default '' comment '密码',
salt varchar(20) default '' comment '盐加密',
status char(1) default '0' comment '帐号状态0正常 1停用',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
login_ip varchar(128) default '' comment '最后登录IP',
login_date datetime comment '最后登录时间',
pwd_update_date datetime comment '密码最后更新时间',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (user_id)
) engine=innodb auto_increment=100 comment = '用户信息表';
-- ----------------------------
-- 初始化-用户信息表数据
-- ----------------------------
insert into sys_user values(1, 103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '29c67a30398638269fe600f73a054934', '111111', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '管理员');
insert into sys_user values(2, 105, 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '8e6d98b90472783cc73c17047ddccf36', '222222', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '测试员');
-- ----------------------------
-- 3、岗位信息表
-- ----------------------------
drop table if exists sys_post;
create table sys_post
(
post_id bigint(20) not null auto_increment comment '岗位ID',
post_code varchar(64) not null comment '岗位编码',
post_name varchar(50) not null comment '岗位名称',
post_sort int(4) not null comment '显示顺序',
status char(1) not null comment '状态0正常 1停用',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (post_id)
) engine=innodb comment = '岗位信息表';
-- ----------------------------
-- 初始化-岗位信息表数据
-- ----------------------------
insert into sys_post values(1, 'ceo', '董事长', 1, '0', 'admin', sysdate(), '', null, '');
insert into sys_post values(2, 'se', '项目经理', 2, '0', 'admin', sysdate(), '', null, '');
insert into sys_post values(3, 'hr', '人力资源', 3, '0', 'admin', sysdate(), '', null, '');
insert into sys_post values(4, 'user', '普通员工', 4, '0', 'admin', sysdate(), '', null, '');
-- ----------------------------
-- 4、角色信息表
-- ----------------------------
drop table if exists sys_role;
create table sys_role (
role_id bigint(20) not null auto_increment comment '角色ID',
role_name varchar(30) not null comment '角色名称',
role_key varchar(100) not null comment '角色权限字符串',
role_sort int(4) not null comment '显示顺序',
data_scope char(1) default '1' comment '数据范围1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限',
status char(1) not null comment '角色状态0正常 1停用',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (role_id)
) engine=innodb auto_increment=100 comment = '角色信息表';
-- ----------------------------
-- 初始化-角色信息表数据
-- ----------------------------
insert into sys_role values('1', '超级管理员', 'admin', 1, 1, '0', '0', 'admin', sysdate(), '', null, '超级管理员');
insert into sys_role values('2', '普通角色', 'common', 2, 2, '0', '0', 'admin', sysdate(), '', null, '普通角色');
-- ----------------------------
-- 5、菜单权限表
-- ----------------------------
drop table if exists sys_menu;
create table sys_menu (
menu_id bigint(20) not null auto_increment comment '菜单ID',
menu_name varchar(50) not null comment '菜单名称',
parent_id bigint(20) default 0 comment '父菜单ID',
order_num int(4) default 0 comment '显示顺序',
url varchar(200) default '#' comment '请求地址',
target varchar(20) default '' comment '打开方式menuItem页签 menuBlank新窗口',
menu_type char(1) default '' comment '菜单类型M目录 C菜单 F按钮',
visible char(1) default 0 comment '菜单状态0显示 1隐藏',
is_refresh char(1) default 1 comment '是否刷新0刷新 1不刷新',
perms varchar(100) default null comment '权限标识',
icon varchar(100) default '#' comment '菜单图标',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default '' comment '备注',
primary key (menu_id)
) engine=innodb auto_increment=2000 comment = '菜单权限表';
-- ----------------------------
-- 初始化-菜单信息表数据
-- ----------------------------
-- 一级菜单
insert into sys_menu values('1', '系统管理', '0', '1', '#', '', 'M', '0', '1', '', 'fa fa-gear', 'admin', sysdate(), '', null, '系统管理目录');
insert into sys_menu values('2', '系统监控', '0', '2', '#', '', 'M', '0', '1', '', 'fa fa-video-camera', 'admin', sysdate(), '', null, '系统监控目录');
insert into sys_menu values('3', '系统工具', '0', '3', '#', '', 'M', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '系统工具目录');
insert into sys_menu values('4', '若依官网', '0', '4', 'http://ruoyi.vip', 'menuBlank', 'C', '0', '1', '', 'fa fa-location-arrow', 'admin', sysdate(), '', null, '若依官网地址');
-- 二级菜单
insert into sys_menu values('100', '用户管理', '1', '1', '/system/user', '', 'C', '0', '1', 'system:user:view', 'fa fa-user-o', 'admin', sysdate(), '', null, '用户管理菜单');
insert into sys_menu values('101', '角色管理', '1', '2', '/system/role', '', 'C', '0', '1', 'system:role:view', 'fa fa-user-secret', 'admin', sysdate(), '', null, '角色管理菜单');
insert into sys_menu values('102', '菜单管理', '1', '3', '/system/menu', '', 'C', '0', '1', 'system:menu:view', 'fa fa-th-list', 'admin', sysdate(), '', null, '菜单管理菜单');
insert into sys_menu values('103', '部门管理', '1', '4', '/system/dept', '', 'C', '0', '1', 'system:dept:view', 'fa fa-outdent', 'admin', sysdate(), '', null, '部门管理菜单');
insert into sys_menu values('104', '岗位管理', '1', '5', '/system/post', '', 'C', '0', '1', 'system:post:view', 'fa fa-address-card-o', 'admin', sysdate(), '', null, '岗位管理菜单');
insert into sys_menu values('105', '字典管理', '1', '6', '/system/dict', '', 'C', '0', '1', 'system:dict:view', 'fa fa-bookmark-o', 'admin', sysdate(), '', null, '字典管理菜单');
insert into sys_menu values('106', '参数设置', '1', '7', '/system/config', '', 'C', '0', '1', 'system:config:view', 'fa fa-sun-o', 'admin', sysdate(), '', null, '参数设置菜单');
insert into sys_menu values('107', '通知公告', '1', '8', '/system/notice', '', 'C', '0', '1', 'system:notice:view', 'fa fa-bullhorn', 'admin', sysdate(), '', null, '通知公告菜单');
insert into sys_menu values('108', '日志管理', '1', '9', '#', '', 'M', '0', '1', '', 'fa fa-pencil-square-o', 'admin', sysdate(), '', null, '日志管理菜单');
insert into sys_menu values('109', '在线用户', '2', '1', '/monitor/online', '', 'C', '0', '1', 'monitor:online:view', 'fa fa-user-circle', 'admin', sysdate(), '', null, '在线用户菜单');
insert into sys_menu values('110', '定时任务', '2', '2', '/monitor/job', '', 'C', '0', '1', 'monitor:job:view', 'fa fa-tasks', 'admin', sysdate(), '', null, '定时任务菜单');
insert into sys_menu values('111', '数据监控', '2', '3', '/monitor/data', '', 'C', '0', '1', 'monitor:data:view', 'fa fa-bug', 'admin', sysdate(), '', null, '数据监控菜单');
insert into sys_menu values('112', '服务监控', '2', '4', '/monitor/server', '', 'C', '0', '1', 'monitor:server:view', 'fa fa-server', 'admin', sysdate(), '', null, '服务监控菜单');
insert into sys_menu values('113', '缓存监控', '2', '5', '/monitor/cache', '', 'C', '0', '1', 'monitor:cache:view', 'fa fa-cube', 'admin', sysdate(), '', null, '缓存监控菜单');
insert into sys_menu values('114', '表单构建', '3', '1', '/tool/build', '', 'C', '0', '1', 'tool:build:view', 'fa fa-wpforms', 'admin', sysdate(), '', null, '表单构建菜单');
insert into sys_menu values('115', '代码生成', '3', '2', '/tool/gen', '', 'C', '0', '1', 'tool:gen:view', 'fa fa-code', 'admin', sysdate(), '', null, '代码生成菜单');
insert into sys_menu values('116', '系统接口', '3', '3', '/tool/swagger', '', 'C', '0', '1', 'tool:swagger:view', 'fa fa-gg', 'admin', sysdate(), '', null, '系统接口菜单');
-- 三级菜单
insert into sys_menu values('500', '操作日志', '108', '1', '/monitor/operlog', '', 'C', '0', '1', 'monitor:operlog:view', 'fa fa-address-book', 'admin', sysdate(), '', null, '操作日志菜单');
insert into sys_menu values('501', '登录日志', '108', '2', '/monitor/logininfor', '', 'C', '0', '1', 'monitor:logininfor:view', 'fa fa-file-image-o', 'admin', sysdate(), '', null, '登录日志菜单');
-- 用户管理按钮
insert into sys_menu values('1000', '用户查询', '100', '1', '#', '', 'F', '0', '1', 'system:user:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1001', '用户新增', '100', '2', '#', '', 'F', '0', '1', 'system:user:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1002', '用户修改', '100', '3', '#', '', 'F', '0', '1', 'system:user:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1003', '用户删除', '100', '4', '#', '', 'F', '0', '1', 'system:user:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1004', '用户导出', '100', '5', '#', '', 'F', '0', '1', 'system:user:export', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1005', '用户导入', '100', '6', '#', '', 'F', '0', '1', 'system:user:import', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1006', '重置密码', '100', '7', '#', '', 'F', '0', '1', 'system:user:resetPwd', '#', 'admin', sysdate(), '', null, '');
-- 角色管理按钮
insert into sys_menu values('1007', '角色查询', '101', '1', '#', '', 'F', '0', '1', 'system:role:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1008', '角色新增', '101', '2', '#', '', 'F', '0', '1', 'system:role:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1009', '角色修改', '101', '3', '#', '', 'F', '0', '1', 'system:role:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1010', '角色删除', '101', '4', '#', '', 'F', '0', '1', 'system:role:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1011', '角色导出', '101', '5', '#', '', 'F', '0', '1', 'system:role:export', '#', 'admin', sysdate(), '', null, '');
-- 菜单管理按钮
insert into sys_menu values('1012', '菜单查询', '102', '1', '#', '', 'F', '0', '1', 'system:menu:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1013', '菜单新增', '102', '2', '#', '', 'F', '0', '1', 'system:menu:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1014', '菜单修改', '102', '3', '#', '', 'F', '0', '1', 'system:menu:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1015', '菜单删除', '102', '4', '#', '', 'F', '0', '1', 'system:menu:remove', '#', 'admin', sysdate(), '', null, '');
-- 部门管理按钮
insert into sys_menu values('1016', '部门查询', '103', '1', '#', '', 'F', '0', '1', 'system:dept:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1017', '部门新增', '103', '2', '#', '', 'F', '0', '1', 'system:dept:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1018', '部门修改', '103', '3', '#', '', 'F', '0', '1', 'system:dept:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1019', '部门删除', '103', '4', '#', '', 'F', '0', '1', 'system:dept:remove', '#', 'admin', sysdate(), '', null, '');
-- 岗位管理按钮
insert into sys_menu values('1020', '岗位查询', '104', '1', '#', '', 'F', '0', '1', 'system:post:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1021', '岗位新增', '104', '2', '#', '', 'F', '0', '1', 'system:post:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1022', '岗位修改', '104', '3', '#', '', 'F', '0', '1', 'system:post:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1023', '岗位删除', '104', '4', '#', '', 'F', '0', '1', 'system:post:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1024', '岗位导出', '104', '5', '#', '', 'F', '0', '1', 'system:post:export', '#', 'admin', sysdate(), '', null, '');
-- 字典管理按钮
insert into sys_menu values('1025', '字典查询', '105', '1', '#', '', 'F', '0', '1', 'system:dict:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1026', '字典新增', '105', '2', '#', '', 'F', '0', '1', 'system:dict:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1027', '字典修改', '105', '3', '#', '', 'F', '0', '1', 'system:dict:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1028', '字典删除', '105', '4', '#', '', 'F', '0', '1', 'system:dict:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1029', '字典导出', '105', '5', '#', '', 'F', '0', '1', 'system:dict:export', '#', 'admin', sysdate(), '', null, '');
-- 参数设置按钮
insert into sys_menu values('1030', '参数查询', '106', '1', '#', '', 'F', '0', '1', 'system:config:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1031', '参数新增', '106', '2', '#', '', 'F', '0', '1', 'system:config:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1032', '参数修改', '106', '3', '#', '', 'F', '0', '1', 'system:config:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1033', '参数删除', '106', '4', '#', '', 'F', '0', '1', 'system:config:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1034', '参数导出', '106', '5', '#', '', 'F', '0', '1', 'system:config:export', '#', 'admin', sysdate(), '', null, '');
-- 通知公告按钮
insert into sys_menu values('1035', '公告查询', '107', '1', '#', '', 'F', '0', '1', 'system:notice:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1036', '公告新增', '107', '2', '#', '', 'F', '0', '1', 'system:notice:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1037', '公告修改', '107', '3', '#', '', 'F', '0', '1', 'system:notice:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1038', '公告删除', '107', '4', '#', '', 'F', '0', '1', 'system:notice:remove', '#', 'admin', sysdate(), '', null, '');
-- 操作日志按钮
insert into sys_menu values('1039', '操作查询', '500', '1', '#', '', 'F', '0', '1', 'monitor:operlog:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1040', '操作删除', '500', '2', '#', '', 'F', '0', '1', 'monitor:operlog:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1041', '详细信息', '500', '3', '#', '', 'F', '0', '1', 'monitor:operlog:detail', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1042', '日志导出', '500', '4', '#', '', 'F', '0', '1', 'monitor:operlog:export', '#', 'admin', sysdate(), '', null, '');
-- 登录日志按钮
insert into sys_menu values('1043', '登录查询', '501', '1', '#', '', 'F', '0', '1', 'monitor:logininfor:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1044', '登录删除', '501', '2', '#', '', 'F', '0', '1', 'monitor:logininfor:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1045', '日志导出', '501', '3', '#', '', 'F', '0', '1', 'monitor:logininfor:export', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1046', '账户解锁', '501', '4', '#', '', 'F', '0', '1', 'monitor:logininfor:unlock', '#', 'admin', sysdate(), '', null, '');
-- 在线用户按钮
insert into sys_menu values('1047', '在线查询', '109', '1', '#', '', 'F', '0', '1', 'monitor:online:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1048', '批量强退', '109', '2', '#', '', 'F', '0', '1', 'monitor:online:batchForceLogout', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1049', '单条强退', '109', '3', '#', '', 'F', '0', '1', 'monitor:online:forceLogout', '#', 'admin', sysdate(), '', null, '');
-- 定时任务按钮
insert into sys_menu values('1050', '任务查询', '110', '1', '#', '', 'F', '0', '1', 'monitor:job:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1051', '任务新增', '110', '2', '#', '', 'F', '0', '1', 'monitor:job:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1052', '任务修改', '110', '3', '#', '', 'F', '0', '1', 'monitor:job:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1053', '任务删除', '110', '4', '#', '', 'F', '0', '1', 'monitor:job:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1054', '状态修改', '110', '5', '#', '', 'F', '0', '1', 'monitor:job:changeStatus', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1055', '任务详细', '110', '6', '#', '', 'F', '0', '1', 'monitor:job:detail', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1056', '任务导出', '110', '7', '#', '', 'F', '0', '1', 'monitor:job:export', '#', 'admin', sysdate(), '', null, '');
-- 代码生成按钮
insert into sys_menu values('1057', '生成查询', '115', '1', '#', '', 'F', '0', '1', 'tool:gen:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1058', '生成修改', '115', '2', '#', '', 'F', '0', '1', 'tool:gen:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1059', '生成删除', '115', '3', '#', '', 'F', '0', '1', 'tool:gen:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1060', '预览代码', '115', '4', '#', '', 'F', '0', '1', 'tool:gen:preview', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1061', '生成代码', '115', '5', '#', '', 'F', '0', '1', 'tool:gen:code', '#', 'admin', sysdate(), '', null, '');
-- ----------------------------
-- 6、用户和角色关联表 用户N-1角色
-- ----------------------------
drop table if exists sys_user_role;
create table sys_user_role (
user_id bigint(20) not null comment '用户ID',
role_id bigint(20) not null comment '角色ID',
primary key(user_id, role_id)
) engine=innodb comment = '用户和角色关联表';
-- ----------------------------
-- 初始化-用户和角色关联表数据
-- ----------------------------
insert into sys_user_role values ('1', '1');
insert into sys_user_role values ('2', '2');
-- ----------------------------
-- 7、角色和菜单关联表 角色1-N菜单
-- ----------------------------
drop table if exists sys_role_menu;
create table sys_role_menu (
role_id bigint(20) not null comment '角色ID',
menu_id bigint(20) not null comment '菜单ID',
primary key(role_id, menu_id)
) engine=innodb comment = '角色和菜单关联表';
-- ----------------------------
-- 初始化-角色和菜单关联表数据
-- ----------------------------
insert into sys_role_menu values ('2', '1');
insert into sys_role_menu values ('2', '2');
insert into sys_role_menu values ('2', '3');
insert into sys_role_menu values ('2', '4');
insert into sys_role_menu values ('2', '100');
insert into sys_role_menu values ('2', '101');
insert into sys_role_menu values ('2', '102');
insert into sys_role_menu values ('2', '103');
insert into sys_role_menu values ('2', '104');
insert into sys_role_menu values ('2', '105');
insert into sys_role_menu values ('2', '106');
insert into sys_role_menu values ('2', '107');
insert into sys_role_menu values ('2', '108');
insert into sys_role_menu values ('2', '109');
insert into sys_role_menu values ('2', '110');
insert into sys_role_menu values ('2', '111');
insert into sys_role_menu values ('2', '112');
insert into sys_role_menu values ('2', '113');
insert into sys_role_menu values ('2', '114');
insert into sys_role_menu values ('2', '115');
insert into sys_role_menu values ('2', '116');
insert into sys_role_menu values ('2', '500');
insert into sys_role_menu values ('2', '501');
insert into sys_role_menu values ('2', '1000');
insert into sys_role_menu values ('2', '1001');
insert into sys_role_menu values ('2', '1002');
insert into sys_role_menu values ('2', '1003');
insert into sys_role_menu values ('2', '1004');
insert into sys_role_menu values ('2', '1005');
insert into sys_role_menu values ('2', '1006');
insert into sys_role_menu values ('2', '1007');
insert into sys_role_menu values ('2', '1008');
insert into sys_role_menu values ('2', '1009');
insert into sys_role_menu values ('2', '1010');
insert into sys_role_menu values ('2', '1011');
insert into sys_role_menu values ('2', '1012');
insert into sys_role_menu values ('2', '1013');
insert into sys_role_menu values ('2', '1014');
insert into sys_role_menu values ('2', '1015');
insert into sys_role_menu values ('2', '1016');
insert into sys_role_menu values ('2', '1017');
insert into sys_role_menu values ('2', '1018');
insert into sys_role_menu values ('2', '1019');
insert into sys_role_menu values ('2', '1020');
insert into sys_role_menu values ('2', '1021');
insert into sys_role_menu values ('2', '1022');
insert into sys_role_menu values ('2', '1023');
insert into sys_role_menu values ('2', '1024');
insert into sys_role_menu values ('2', '1025');
insert into sys_role_menu values ('2', '1026');
insert into sys_role_menu values ('2', '1027');
insert into sys_role_menu values ('2', '1028');
insert into sys_role_menu values ('2', '1029');
insert into sys_role_menu values ('2', '1030');
insert into sys_role_menu values ('2', '1031');
insert into sys_role_menu values ('2', '1032');
insert into sys_role_menu values ('2', '1033');
insert into sys_role_menu values ('2', '1034');
insert into sys_role_menu values ('2', '1035');
insert into sys_role_menu values ('2', '1036');
insert into sys_role_menu values ('2', '1037');
insert into sys_role_menu values ('2', '1038');
insert into sys_role_menu values ('2', '1039');
insert into sys_role_menu values ('2', '1040');
insert into sys_role_menu values ('2', '1041');
insert into sys_role_menu values ('2', '1042');
insert into sys_role_menu values ('2', '1043');
insert into sys_role_menu values ('2', '1044');
insert into sys_role_menu values ('2', '1045');
insert into sys_role_menu values ('2', '1046');
insert into sys_role_menu values ('2', '1047');
insert into sys_role_menu values ('2', '1048');
insert into sys_role_menu values ('2', '1049');
insert into sys_role_menu values ('2', '1050');
insert into sys_role_menu values ('2', '1051');
insert into sys_role_menu values ('2', '1052');
insert into sys_role_menu values ('2', '1053');
insert into sys_role_menu values ('2', '1054');
insert into sys_role_menu values ('2', '1055');
insert into sys_role_menu values ('2', '1056');
insert into sys_role_menu values ('2', '1057');
insert into sys_role_menu values ('2', '1058');
insert into sys_role_menu values ('2', '1059');
insert into sys_role_menu values ('2', '1060');
insert into sys_role_menu values ('2', '1061');
-- ----------------------------
-- 8、角色和部门关联表 角色1-N部门
-- ----------------------------
drop table if exists sys_role_dept;
create table sys_role_dept (
role_id bigint(20) not null comment '角色ID',
dept_id bigint(20) not null comment '部门ID',
primary key(role_id, dept_id)
) engine=innodb comment = '角色和部门关联表';
-- ----------------------------
-- 初始化-角色和部门关联表数据
-- ----------------------------
insert into sys_role_dept values ('2', '100');
insert into sys_role_dept values ('2', '101');
insert into sys_role_dept values ('2', '105');
-- ----------------------------
-- 9、用户与岗位关联表 用户1-N岗位
-- ----------------------------
drop table if exists sys_user_post;
create table sys_user_post
(
user_id bigint(20) not null comment '用户ID',
post_id bigint(20) not null comment '岗位ID',
primary key (user_id, post_id)
) engine=innodb comment = '用户与岗位关联表';
-- ----------------------------
-- 初始化-用户与岗位关联表数据
-- ----------------------------
insert into sys_user_post values ('1', '1');
insert into sys_user_post values ('2', '2');
-- ----------------------------
-- 10、操作日志记录
-- ----------------------------
drop table if exists sys_oper_log;
create table sys_oper_log (
oper_id bigint(20) not null auto_increment comment '日志主键',
title varchar(50) default '' comment '模块标题',
business_type int(2) default 0 comment '业务类型0其它 1新增 2修改 3删除',
method varchar(100) default '' comment '方法名称',
request_method varchar(10) default '' comment '请求方式',
operator_type int(1) default 0 comment '操作类别0其它 1后台用户 2手机端用户',
oper_name varchar(50) default '' comment '操作人员',
dept_name varchar(50) default '' comment '部门名称',
oper_url varchar(255) default '' comment '请求URL',
oper_ip varchar(128) default '' comment '主机地址',
oper_location varchar(255) default '' comment '操作地点',
oper_param varchar(2000) default '' comment '请求参数',
json_result varchar(2000) default '' comment '返回参数',
status int(1) default 0 comment '操作状态0正常 1异常',
error_msg varchar(2000) default '' comment '错误消息',
oper_time datetime comment '操作时间',
primary key (oper_id)
) engine=innodb auto_increment=100 comment = '操作日志记录';
-- ----------------------------
-- 11、字典类型表
-- ----------------------------
drop table if exists sys_dict_type;
create table sys_dict_type
(
dict_id bigint(20) not null auto_increment comment '字典主键',
dict_name varchar(100) default '' comment '字典名称',
dict_type varchar(100) default '' comment '字典类型',
status char(1) default '0' comment '状态0正常 1停用',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (dict_id),
unique (dict_type)
) engine=innodb auto_increment=100 comment = '字典类型表';
insert into sys_dict_type values(1, '用户性别', 'sys_user_sex', '0', 'admin', sysdate(), '', null, '用户性别列表');
insert into sys_dict_type values(2, '菜单状态', 'sys_show_hide', '0', 'admin', sysdate(), '', null, '菜单状态列表');
insert into sys_dict_type values(3, '系统开关', 'sys_normal_disable', '0', 'admin', sysdate(), '', null, '系统开关列表');
insert into sys_dict_type values(4, '任务状态', 'sys_job_status', '0', 'admin', sysdate(), '', null, '任务状态列表');
insert into sys_dict_type values(5, '任务分组', 'sys_job_group', '0', 'admin', sysdate(), '', null, '任务分组列表');
insert into sys_dict_type values(6, '系统是否', 'sys_yes_no', '0', 'admin', sysdate(), '', null, '系统是否列表');
insert into sys_dict_type values(7, '通知类型', 'sys_notice_type', '0', 'admin', sysdate(), '', null, '通知类型列表');
insert into sys_dict_type values(8, '通知状态', 'sys_notice_status', '0', 'admin', sysdate(), '', null, '通知状态列表');
insert into sys_dict_type values(9, '操作类型', 'sys_oper_type', '0', 'admin', sysdate(), '', null, '操作类型列表');
insert into sys_dict_type values(10, '系统状态', 'sys_common_status', '0', 'admin', sysdate(), '', null, '登录状态列表');
-- ----------------------------
-- 12、字典数据表
-- ----------------------------
drop table if exists sys_dict_data;
create table sys_dict_data
(
dict_code bigint(20) not null auto_increment comment '字典编码',
dict_sort int(4) default 0 comment '字典排序',
dict_label varchar(100) default '' comment '字典标签',
dict_value varchar(100) default '' comment '字典键值',
dict_type varchar(100) default '' comment '字典类型',
css_class varchar(100) default null comment '样式属性(其他样式扩展)',
list_class varchar(100) default null comment '表格回显样式',
is_default char(1) default 'N' comment '是否默认Y是 N否',
status char(1) default '0' comment '状态0正常 1停用',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (dict_code)
) engine=innodb auto_increment=100 comment = '字典数据表';
insert into sys_dict_data values(1, 1, '', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', sysdate(), '', null, '性别男');
insert into sys_dict_data values(2, 2, '', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '性别女');
insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '性别未知');
insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '显示菜单');
insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '隐藏菜单');
insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态');
insert into sys_dict_data values(8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
insert into sys_dict_data values(9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态');
insert into sys_dict_data values(10, 1, '默认', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', sysdate(), '', null, '默认分组');
insert into sys_dict_data values(11, 2, '系统', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', sysdate(), '', null, '系统分组');
insert into sys_dict_data values(12, 1, '', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '系统默认是');
insert into sys_dict_data values(13, 2, '', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '系统默认否');
insert into sys_dict_data values(14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', sysdate(), '', null, '通知');
insert into sys_dict_data values(15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', sysdate(), '', null, '公告');
insert into sys_dict_data values(16, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
insert into sys_dict_data values(17, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '关闭状态');
insert into sys_dict_data values(18, 99, '其他', '0', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '其他操作');
insert into sys_dict_data values(19, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '新增操作');
insert into sys_dict_data values(20, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '修改操作');
insert into sys_dict_data values(21, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '删除操作');
insert into sys_dict_data values(22, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '授权操作');
insert into sys_dict_data values(23, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '导出操作');
insert into sys_dict_data values(24, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '导入操作');
insert into sys_dict_data values(25, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '强退操作');
insert into sys_dict_data values(26, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '生成操作');
insert into sys_dict_data values(27, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '清空操作');
insert into sys_dict_data values(28, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '正常状态');
insert into sys_dict_data values(29, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态');
-- ----------------------------
-- 13、参数配置表
-- ----------------------------
drop table if exists sys_config;
create table sys_config (
config_id int(5) not null auto_increment comment '参数主键',
config_name varchar(100) default '' comment '参数名称',
config_key varchar(100) default '' comment '参数键名',
config_value varchar(500) default '' comment '参数键值',
config_type char(1) default 'N' comment '系统内置Y是 N否',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (config_id)
) engine=innodb auto_increment=100 comment = '参数配置表';
insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow');
insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', sysdate(), '', null, '初始化密码 123456');
insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', sysdate(), '', null, '深黑主题theme-dark浅色主题theme-light深蓝主题theme-blue');
insert into sys_config values(4, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', sysdate(), '', null, '是否开启注册用户功能true开启false关闭');
insert into sys_config values(5, '用户管理-密码字符范围', 'sys.account.chrtype', '0', 'Y', 'admin', sysdate(), '', null, '默认任意字符范围0任意密码可以输入任意字符1数字密码只能为0-9数字2英文字母密码只能为a-z和A-Z字母3字母和数字密码必须包含字母数字,4字母数字和特殊字符目前支持的特殊字符包括~!@#$%^&*()-=_+');
insert into sys_config values(6, '用户管理-初始密码修改策略', 'sys.account.initPasswordModify', '0', 'Y', 'admin', sysdate(), '', null, '0初始密码修改策略关闭没有任何提示1提醒用户如果未修改初始密码则在登录时就会提醒修改密码对话框');
insert into sys_config values(7, '用户管理-账号密码更新周期', 'sys.account.passwordValidateDays', '0', 'Y', 'admin', sysdate(), '', null, '密码更新周期填写数字数据初始化值为0不限制若修改必须为大于0小于365的正整数如果超过这个周期登录系统时则在登录时就会提醒修改密码对话框');
insert into sys_config values(8, '主框架页-菜单导航显示风格', 'sys.index.menuStyle', 'default', 'Y', 'admin', sysdate(), '', null, '菜单导航显示风格default为左侧导航菜单topnav为顶部导航菜单');
insert into sys_config values(9, '主框架页-是否开启页脚', 'sys.index.footer', 'true', 'Y', 'admin', sysdate(), '', null, '是否开启底部页脚显示true显示false隐藏');
insert into sys_config values(10, '主框架页-是否开启页签', 'sys.index.tagsView', 'true', 'Y', 'admin', sysdate(), '', null, '是否开启菜单多页签显示true显示false隐藏');
-- ----------------------------
-- 14、系统访问记录
-- ----------------------------
drop table if exists sys_logininfor;
create table sys_logininfor (
info_id bigint(20) not null auto_increment comment '访问ID',
login_name varchar(50) default '' comment '登录账号',
ipaddr varchar(128) default '' comment '登录IP地址',
login_location varchar(255) default '' comment '登录地点',
browser varchar(50) default '' comment '浏览器类型',
os varchar(50) default '' comment '操作系统',
status char(1) default '0' comment '登录状态0成功 1失败',
msg varchar(255) default '' comment '提示消息',
login_time datetime comment '访问时间',
primary key (info_id)
) engine=innodb auto_increment=100 comment = '系统访问记录';
-- ----------------------------
-- 15、在线用户记录
-- ----------------------------
drop table if exists sys_user_online;
create table sys_user_online (
sessionId varchar(50) default '' comment '用户会话id',
login_name varchar(50) default '' comment '登录账号',
dept_name varchar(50) default '' comment '部门名称',
ipaddr varchar(128) default '' comment '登录IP地址',
login_location varchar(255) default '' comment '登录地点',
browser varchar(50) default '' comment '浏览器类型',
os varchar(50) default '' comment '操作系统',
status varchar(10) default '' comment '在线状态on_line在线off_line离线',
start_timestamp datetime comment 'session创建时间',
last_access_time datetime comment 'session最后访问时间',
expire_time int(5) default 0 comment '超时时间,单位为分钟',
primary key (sessionId)
) engine=innodb comment = '在线用户记录';
-- ----------------------------
-- 16、定时任务调度表
-- ----------------------------
drop table if exists sys_job;
create table sys_job (
job_id bigint(20) not null auto_increment comment '任务ID',
job_name varchar(64) default '' comment '任务名称',
job_group varchar(64) default 'DEFAULT' comment '任务组名',
invoke_target varchar(500) not null comment '调用目标字符串',
cron_expression varchar(255) default '' comment 'cron执行表达式',
misfire_policy varchar(20) default '3' comment '计划执行错误策略1立即执行 2执行一次 3放弃执行',
concurrent char(1) default '1' comment '是否并发执行0允许 1禁止',
status char(1) default '0' comment '状态0正常 1暂停',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default '' comment '备注信息',
primary key (job_id, job_name, job_group)
) engine=innodb auto_increment=100 comment = '定时任务调度表';
insert into sys_job values(1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
insert into sys_job values(2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
insert into sys_job values(3, '系统默认(多参)', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)', '0/20 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
-- ----------------------------
-- 17、定时任务调度日志表
-- ----------------------------
drop table if exists sys_job_log;
create table sys_job_log (
job_log_id bigint(20) not null auto_increment comment '任务日志ID',
job_name varchar(64) not null comment '任务名称',
job_group varchar(64) not null comment '任务组名',
invoke_target varchar(500) not null comment '调用目标字符串',
job_message varchar(500) comment '日志信息',
status char(1) default '0' comment '执行状态0正常 1失败',
exception_info varchar(2000) default '' comment '异常信息',
create_time datetime comment '创建时间',
primary key (job_log_id)
) engine=innodb comment = '定时任务调度日志表';
-- ----------------------------
-- 18、通知公告表
-- ----------------------------
drop table if exists sys_notice;
create table sys_notice (
notice_id int(4) not null auto_increment comment '公告ID',
notice_title varchar(50) not null comment '公告标题',
notice_type char(1) not null comment '公告类型1通知 2公告',
notice_content varchar(2000) default null comment '公告内容',
status char(1) default '0' comment '公告状态0正常 1关闭',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(255) default null comment '备注',
primary key (notice_id)
) engine=innodb auto_increment=10 comment = '通知公告表';
-- ----------------------------
-- 初始化-公告信息表数据
-- ----------------------------
insert into sys_notice values('1', '温馨提醒2018-07-01 若依新版本发布啦', '2', '新版本内容', '0', 'admin', sysdate(), '', null, '管理员');
insert into sys_notice values('2', '维护通知2018-07-01 若依系统凌晨维护', '1', '维护内容', '0', 'admin', sysdate(), '', null, '管理员');
-- ----------------------------
-- 19、代码生成业务表
-- ----------------------------
drop table if exists gen_table;
create table gen_table (
table_id bigint(20) not null auto_increment comment '编号',
table_name varchar(200) default '' comment '表名称',
table_comment varchar(500) default '' comment '表描述',
sub_table_name varchar(64) default null comment '关联子表的表名',
sub_table_fk_name varchar(64) default null comment '子表关联的外键名',
class_name varchar(100) default '' comment '实体类名称',
tpl_category varchar(200) default 'crud' comment '使用的模板crud单表操作 tree树表操作 sub主子表操作',
package_name varchar(100) comment '生成包路径',
module_name varchar(30) comment '生成模块名',
business_name varchar(30) comment '生成业务名',
function_name varchar(50) comment '生成功能名',
function_author varchar(50) comment '生成功能作者',
gen_type char(1) default '0' comment '生成代码方式0zip压缩包 1自定义路径',
gen_path varchar(200) default '/' comment '生成路径(不填默认项目路径)',
options varchar(1000) comment '其它生成选项',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (table_id)
) engine=innodb auto_increment=1 comment = '代码生成业务表';
-- ----------------------------
-- 20、代码生成业务表字段
-- ----------------------------
drop table if exists gen_table_column;
create table gen_table_column (
column_id bigint(20) not null auto_increment comment '编号',
table_id varchar(64) comment '归属表编号',
column_name varchar(200) comment '列名称',
column_comment varchar(500) comment '列描述',
column_type varchar(100) comment '列类型',
java_type varchar(500) comment 'JAVA类型',
java_field varchar(200) comment 'JAVA字段名',
is_pk char(1) comment '是否主键1是',
is_increment char(1) comment '是否自增1是',
is_required char(1) comment '是否必填1是',
is_insert char(1) comment '是否为插入字段1是',
is_edit char(1) comment '是否编辑字段1是',
is_list char(1) comment '是否列表字段1是',
is_query char(1) comment '是否查询字段1是',
query_type varchar(200) default 'EQ' comment '查询方式(等于、不等于、大于、小于、范围)',
html_type varchar(200) comment '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)',
dict_type varchar(200) default '' comment '字典类型',
sort int comment '排序',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
primary key (column_id)
) engine=innodb auto_increment=1 comment = '代码生成业务表字段';

Binary file not shown.

@ -0,0 +1,35 @@
2021-12-11 18:30:21 --- 2021-12-12 19:36:42
调整配置支持sqlite嵌入式数据库
1、首先添加【依赖包】、sqlite依赖、【注释 ScheduleConfig。java】定时任务配置 src/main/java/com/ruoyi/framework/config/ScheduleConfig.java
2、添加【application.yml】、修改url配置文件、驱动时间格式、配置数据库绝对路径 java mybatisplus Error parsing time stamp https://blog.csdn.net/weixin_39910452/article/details/118391867
3、调整 【application.yml 配置检测连接是否有效】 sqlite 不支持DUAL, 调整为sys_user
4、sqlite 获取系统当前时间是 sysdate()/datetime('now'),插入时间使用datetime('now')【修改**.xml文件】
Sqlite 当前时区的当前时间与正常差8h. datetime('now') 更改为 (datetime(CURRENT_TIMESTAMP,'localtime'))
5、sqlite设置主键自动增长、sqlit修改默认值 :slite_sequence存储的表的自增长id 【修改数据库文件】
6、清空表记录:SQLite中并不支持Truncate语句、使用Delete来删除全部表数据、sqlite_sequenc存放表自增列的当前序号【修改**.xml文件】
delete from TableName; //清空数据
update sqlite_sequence SET seq = 0 where name ='TableName';//同步执行后会把自增长ID修改为0
7、Date日期类型( Sat Dec 11 20:51:41 CST 2021)插入数据库后会转换为时间戳;【 数据库文件修改日期格式为date,默认(strftime('%Y-%m-%d %H:%M:%f','now'))】
8、replace into sys_user_online 【报错后数据不影响正常运行】 merge sql error, dbType sqlite, druid-1.2.8, sql : replace into sys_user_online
9、关联语句查询页面【前端设置 sortName: "u.createTime"】 SQL error or missing database (ambiguous column name: create_time)
10、在SQLite中替代mysql中find_in_set()函数的使用 FIND_IN_SET(value, column_name) 【修改**.xml文件】
如果只需要true/false值而不是索引则可以使用LIKE子句: (',' || column_name || ',') LIKE '%,value,%' https://www.it1352.com/1667649.html
11、SQLite 与 Mysql 分别在mybatis中模糊查询的写法 LIKE CONCAT('%',#{roleName},'%') / like '%'||#{roleName}||'%' https://www.jianshu.com/p/5c90722a66cd
Sqlite中不包含Concat函数帮助我们处理就只能用最原始的字符串拼接特别的Sqlite中使用 '||' 符号做拼接而不是 + 【修改**。xml文件】
12、【tool模块 语法差别较大,未处理】 MySQL SQLite 和 PostgreSQL 关于information_schema 的一些查询(表结构,表信息,库信息.... https://blog.csdn.net/weixin_41986096/article/details/106236359
13、 处理排序失败引入jsqlparser依赖未解决【 报错后数据不影响正常运行】: net.sf.jsqlparser.JSQLParserException: Encountered unexpected token: "||" <OP_CONCAT> at line 4, column 37.
调整文件汇总
调整版本v4.7.1 更新日志http://doc.ruoyi.vip/ruoyi/document/gxrz.html#v4-7-1
src/main/java/com/ruoyi/framework/config/ScheduleConfig.java
src/main/resources/mybatis/**/**.xml
src/main/resources/templates/system/user/user.html
src/main/resources/application-druid.yml
src/main/resources/application.yml
pom.xml
src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
调整配置支持sqlite嵌入式数据库
14、Sqlite 当前时区的当前时间与正常差8h调整. datetime('now') 更改为 (datetime(CURRENT_TIMESTAMP,'localtime'))
15、concat函数调整 concat(m.menu_id, ifnull(m.perms,''))——————(m.menu_id || ifnull(m.perms,''))

@ -0,0 +1,50 @@
package com.archive;
import com.archive.common.archiveUtil.MacUtil;
import java.text.SimpleDateFormat;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class ArchiveApplication
{
public static String MAC = "9E-5C-B9-BA-E2-66";
public static String ckDate = "2024-08-14";
public static int sqsj = 90;
public static void main(String[] args) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
System.out.println("系统授权MAC:" + MAC);
System.out.println("系统授权时间:" + ckDate);
boolean res = MacUtil.sqjy(MAC, ckDate, sqsj);
if (res) {
SpringApplication.run(com.archive.ArchiveApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 系统启动成功 ლ(´ڡ`ლ)゙ ");
}
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\ArchiveApplication.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,24 @@
package com.archive;
import com.archive.ArchiveApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
public class ArchiveServletInitializer
extends SpringBootServletInitializer
{
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(new Class[] { ArchiveApplication.class });
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\ArchiveServletInitializer.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,79 @@
package com.archive.common.archiveUtil;
import org.ansj.domain.Result;
import org.ansj.splitWord.analysis.BaseAnalysis;
import org.ansj.splitWord.analysis.NlpAnalysis;
import org.ansj.splitWord.analysis.ToAnalysis;
public class AnsjTextUtil
{
public static String jbfc(String text) {
long startTime = System.currentTimeMillis();
Result analysisedResult = BaseAnalysis.parse(text);
long endTime = System.currentTimeMillis();
long time = endTime - startTime;
System.out.println("基本分词: " + analysisedResult + "(" + time + "ms)");
return analysisedResult.toString();
}
public static String jzfc(String text) {
long startTime = System.currentTimeMillis();
String analysisedText = ToAnalysis.parse(text).toStringWithOutNature();
long endTime = System.currentTimeMillis();
long time = endTime - startTime;
System.out.println("精准分词: " + analysisedText + "(" + time + "ms)");
return analysisedText;
}
public static String nlpfc(String text) {
long startTime = System.currentTimeMillis();
String analysisedText = NlpAnalysis.parse(text).toStringWithOutNature();
long endTime = System.currentTimeMillis();
long time = endTime - startTime;
System.out.println("nlp分词: " + analysisedText + "(" + time + "ms)");
return analysisedText;
}
public static void main(String[] args) {
jzfc("昨天晚上张三睡觉忘了关窗户");
jbfc("昨天晚上张三睡觉忘了关窗户");
nlpfc("昨天晚上张三睡觉忘了关窗户");
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\AnsjTextUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,78 @@
package com.archive.common.archiveUtil;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class CopyFileUtil
{
public static void copyFile(File fromFilePath, File toFilePath) {
FileInputStream fis = null;
FileOutputStream fos = null;
try {
String str = toFilePath.toString();
File filePath = new File(str.substring(0, str.indexOf(toFilePath.getName())));
if (!filePath.exists() && !filePath.isDirectory()) {
filePath.mkdirs();
}
fis = new FileInputStream(fromFilePath);
fos = new FileOutputStream(toFilePath);
byte[] b = new byte[1024];
while (fis.read(b) != -1) {
fos.write(b);
}
if (fis != null) {
fis.close();
fis = null;
}
if (fos != null) {
fos.flush();
fos.close();
fos = null;
}
} catch (FileNotFoundException e) {
System.out.println("源文件不存在");
} catch (IOException e) {
System.out.println("io异常");
} finally {
if (fos != null) {
try {
fos.close();
} catch (IOException iOException) {}
}
if (fis != null) {
try {
fis.close();
} catch (IOException iOException) {}
}
}
}
public static void main(String[] args) {
File file1 = new File("C:\\Users\\18291\\Desktop\\watermark\\0101-2001-长期-办公室-0005.pdf");
File file2 = new File("C:\\Users\\18291\\Desktop\\watermark\\1\\2\\w3.pdf");
copyFile(file1, file2);
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\CopyFileUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,185 @@
package com.archive.common.archiveUtil;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Element;
import com.itextpdf.text.Font;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.Phrase;
import com.itextpdf.text.Rectangle;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
public class CreatePdfUtil
{
public static void createlocalPdf() {
String outPath = "F://test.pdf";
Rectangle rect = new Rectangle(PageSize.A4);
try {
Document doc = new Document(rect);
PdfWriter writer = PdfWriter.getInstance(doc, new FileOutputStream(new File(outPath)));
doc.open();
doc.newPage();
float[] columnWidth = { 10.0F, 30.0F, 50.0F, 30.0F, 30.0F };
String[] heads = { "序号", "档号", "题名", "日期", "页数" };
List<Object[]> dataList = new ArrayList();
for (int i = 0; i < 35; i++) {
Object[] objs = new Object[5];
objs[0] = Integer.valueOf(i + 1);
objs[1] = "001-WS.2015-Y-0001";
objs[2] = "关于XXXXX的XXXXX的通知批示处理请先当官实打实打算发生和发动机和法国价格合适的范围为发生阿三大苏打撒旦发个发生发、阿三大苏打实打实鬼地方鬼地方生啊沙发沙发沙发上";
objs[3] = "2015-06-21";
objs[4] = "15";
dataList.add(objs);
}
createTableByData(writer, doc, columnWidth, "测试表格", heads, dataList);
doc.close();
}
catch (Exception ex) {
ex.printStackTrace();
}
}
private static final String TITLE = "";
public static PdfPCell createSetCell(String value, Font font) {
PdfPCell cell = new PdfPCell();
cell.setPhrase(new Phrase(value, font));
cell.setVerticalAlignment(5);
cell.setHorizontalAlignment(1);
return cell;
}
public static void createTableByData(PdfWriter writer, Document document, float[] columnWidth, String title, String[] heads, List<Object[]> dataList) throws DocumentException, IOException {
PdfPTable table = new PdfPTable(columnWidth);
table.setTotalWidth(520.0F);
table.setPaddingTop(200.0F);
table.setLockedWidth(true);
table.setHorizontalAlignment(1);
table.writeSelectedRows(0, -1, 500.0F, 800.0F, writer.getDirectContentUnder());
table.setHeaderRows(2);
BaseFont baseFont = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", false);
Font textFont = new Font(baseFont, 10.0F, 0);
PdfPCell heandCell = new PdfPCell();
heandCell.setRowspan(1);
heandCell.setColspan(heads.length);
heandCell.setFixedHeight(40.0F);
heandCell.setBorder(0);
heandCell.setVerticalAlignment(5);
heandCell.setHorizontalAlignment(1);
heandCell.setPhrase(new Phrase(title, textFont));
table.addCell(heandCell);
int i;
for (i = 0; i < heads.length; i++) {
PdfPCell heardCell = new PdfPCell();
heardCell.setVerticalAlignment(5);
heardCell.setHorizontalAlignment(1);
heardCell.setPhrase(new Phrase(heads[i], textFont));
heardCell.setMinimumHeight(20.0F);
table.addCell(heardCell);
}
for (i = 0; i < dataList.size(); i++) {
PdfPCell setCell1 = createSetCell((i + 1) + "", textFont);
table.addCell(setCell1);
for (int a = 1; a < heads.length; a++) {
PdfPCell setCell2 = createSetCell((((Object[])dataList.get(i))[a] == null) ? "" : ((Object[])dataList.get(i))[a].toString(), textFont);
table.addCell(setCell2);
}
}
document.add((Element)table);
}
public static void main(String[] args) {
createlocalPdf();
}
public static void download(String path, HttpServletResponse response) {
try {
File file = new File(path);
String filename = file.getName();
InputStream fis = new BufferedInputStream(new FileInputStream(path));
byte[] buffer = new byte[fis.available()];
fis.read(buffer);
fis.close();
response.reset();
response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8"));
response.addHeader("Content-Length", "" + file.length());
OutputStream toClient = new BufferedOutputStream((OutputStream)response.getOutputStream());
response.setContentType("application/pdf;charset=gb2312");
toClient.write(buffer);
toClient.flush();
toClient.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\CreatePdfUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,752 @@
package com.archive.common.archiveUtil;
import com.archive.project.common.service.IExecuteSqlService;
import com.archive.project.dasz.basecolumn.domain.ColumnDocument;
import com.archive.project.dasz.basecolumn.domain.ColumnFile;
import com.archive.project.dasz.basecolumn.domain.ColumnFolder;
import com.archive.project.dasz.basecolumn.domain.ColumnInfo;
import com.archive.project.dasz.basecolumn.service.IColumnDocumentService;
import com.archive.project.dasz.basecolumn.service.IColumnFileService;
import com.archive.project.dasz.basecolumn.service.IColumnFolderService;
import com.archive.project.dasz.basecolumn.service.IColumnInfoService;
import com.archive.project.dasz.physicaltable.domain.PhysicalTable;
import com.archive.project.dasz.physicaltable.service.IPhysicalTableService;
import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn;
import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class CreateTableAndInsertPhysicalTable
{
@Autowired
public IExecuteSqlService executeSqlService;
@Autowired
public IColumnFolderService columnFolderService;
@Autowired
public IColumnFileService columnFileService;
@Autowired
public IColumnDocumentService columnDocumentService;
@Autowired
public IColumnInfoService columnInfoService;
@Autowired
public IPhysicalTableService physicalTableService;
@Autowired
public IPhysicalTableColumnService physicalTableColumnService;
public static com.archive.common.archiveUtil.CreateTableAndInsertPhysicalTable createTableAndInsertPhysicalTable;
@PostConstruct
public void init() {
createTableAndInsertPhysicalTable = this;
}
public static void createFolderTable(String code, String archiveTypeName, String archivetypeid) throws Exception {
String tableName = "t_ar_" + code + "_folder";
tableName = tableName.toLowerCase();
PhysicalTable physicalTable = new PhysicalTable();
physicalTable.setTablename(tableName);
physicalTable.setShowname(archiveTypeName + "-案卷表");
physicalTable.setTableCode("folder");
physicalTable.setShoworder(Long.valueOf(1L));
physicalTable.setArchivetypeid(archivetypeid);
physicalTable.setArchivetypecode(code);
createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable);
List<PhysicalTableColumn> ptcList = new ArrayList<>();
List<ColumnFolder> columnFolderList = createTableAndInsertPhysicalTable.columnFolderService.selectColumnFolderList(new ColumnFolder());
String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`";
String createSql = "create table " + tableName + " (";
String columnsSql = "`id` int(11) NOT NULL AUTO_INCREMENT";
for (int i = 0; i < columnFolderList.size(); i++) {
ColumnFolder cf = columnFolderList.get(i);
if (cf != null) {
String columnType = "";
String mrz = "";
switch (cf.getColumnType()) {
case "D":
columnType = "varchar(" + cf.getColumnLength() + ")";
break;
case "S":
columnType = "varchar(" + cf.getColumnLength() + ")";
break;
case "C":
columnType = "int(" + cf.getColumnLength() + ")";
break;
}
if (cf.getMrz() != null && !cf.getMrz().equals("")) {
if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT '" + cf.getMrz() + "'";
} else if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT " + cf.getMrz() + "";
} else if (cf.getColumnType().equals("C")) {
mrz = "DEFAULT " + cf.getMrz() + "";
}
}
columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz + " COMMENT '" + cf.getColumnName() + "' ";
}
PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn();
physicalTableColumn.setColumnName(cf.getColumnName());
physicalTableColumn.setColumnCode(cf.getColumnCode());
physicalTableColumn.setColumnLength(cf.getColumnLength());
physicalTableColumn.setColumnType(cf.getColumnType());
physicalTableColumn.setColumnCodetype(cf.getColumnCodetype());
physicalTableColumn.setBz(cf.getBz());
physicalTableColumn.setPxx(cf.getPxx());
physicalTableColumn.setLbx(cf.getLbx());
physicalTableColumn.setJmx(cf.getJmx());
physicalTableColumn.setJsx(cf.getJsx());
physicalTableColumn.setMrz(cf.getMrz());
physicalTableColumn.setShowType(cf.getShowType());
physicalTableColumn.setTableId(physicalTable.getId());
ptcList.add(physicalTableColumn);
}
columnsSql = columnsSql + ",PRIMARY KEY (`id`) USING BTREE ";
createSql = createSql + columnsSql + ") ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '" + archiveTypeName + "-案卷表' ROW_FORMAT = Dynamic";
System.out.println("~~~createSql" + createSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql);
for (PhysicalTableColumn physicalTableColumn : ptcList) {
createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true);
}
}
public static void createFolderTableSqlite(String code, String archiveTypeName, String archivetypeid) throws Exception {
String tableName = "t_ar_" + code + "_folder";
tableName = tableName.toLowerCase();
PhysicalTable physicalTable = new PhysicalTable();
physicalTable.setTablename(tableName);
physicalTable.setShowname(archiveTypeName + "-案卷表");
physicalTable.setTableCode("folder");
physicalTable.setShoworder(Long.valueOf(1L));
physicalTable.setArchivetypeid(archivetypeid);
physicalTable.setArchivetypecode(code);
createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable);
List<PhysicalTableColumn> ptcList = new ArrayList<>();
List<ColumnFolder> columnFolderList = createTableAndInsertPhysicalTable.columnFolderService.selectColumnFolderList(new ColumnFolder());
String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`";
String createSql = "create table " + tableName + " (";
String columnsSql = "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT";
for (int i = 0; i < columnFolderList.size(); i++) {
ColumnFolder cf = columnFolderList.get(i);
if (cf != null) {
String columnType = "";
String mrz = "";
switch (cf.getColumnType()) {
case "D":
columnType = "TEXT(" + cf.getColumnLength() + ")";
break;
case "S":
columnType = "TEXT(" + cf.getColumnLength() + ")";
break;
case "C":
columnType = "INTEGER";
break;
}
if (cf.getMrz() != null && !cf.getMrz().equals("")) {
if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT '" + cf.getMrz() + "'";
} else if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT " + cf.getMrz() + "";
} else if (cf.getColumnType().equals("C")) {
mrz = "DEFAULT " + cf.getMrz() + "";
}
}
columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz;
}
PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn();
physicalTableColumn.setColumnName(cf.getColumnName());
physicalTableColumn.setColumnCode(cf.getColumnCode());
physicalTableColumn.setColumnLength(cf.getColumnLength());
physicalTableColumn.setColumnType(cf.getColumnType());
physicalTableColumn.setColumnCodetype(cf.getColumnCodetype());
physicalTableColumn.setBz(cf.getBz());
physicalTableColumn.setPxx(cf.getPxx());
physicalTableColumn.setLbx(cf.getLbx());
physicalTableColumn.setJmx(cf.getJmx());
physicalTableColumn.setJsx(cf.getJsx());
physicalTableColumn.setMrz(cf.getMrz());
physicalTableColumn.setShowType(cf.getShowType());
physicalTableColumn.setTableId(physicalTable.getId());
ptcList.add(physicalTableColumn);
}
createSql = createSql + columnsSql + ") ";
System.out.println("~~~createSql" + createSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql);
for (PhysicalTableColumn physicalTableColumn : ptcList) {
createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true);
}
}
public static void createFileTable(String code, String archiveTypeName, String archivetypeid) throws Exception {
String tableName = "t_ar_" + code + "_file";
tableName = tableName.toLowerCase();
PhysicalTable physicalTable = new PhysicalTable();
physicalTable.setTablename(tableName);
physicalTable.setShowname(archiveTypeName + "-文件表");
physicalTable.setTableCode("file");
physicalTable.setShoworder(Long.valueOf(2L));
physicalTable.setArchivetypeid(archivetypeid);
physicalTable.setArchivetypecode(code);
createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable);
List<PhysicalTableColumn> ptcList = new ArrayList<>();
ColumnFile cf1 = new ColumnFile();
List<ColumnFile> columnFileList = createTableAndInsertPhysicalTable.columnFileService.selectColumnFileList(cf1);
String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`";
String createSql = "create table " + tableName + " (";
String columnsSql = "`id` int(11) NOT NULL AUTO_INCREMENT";
for (int i = 0; i < columnFileList.size(); i++) {
ColumnFile cf = columnFileList.get(i);
if (cf != null) {
String columnType = "";
String mrz = "";
switch (cf.getColumnType()) {
case "D":
columnType = "varchar(" + cf.getColumnLength() + ")";
break;
case "S":
columnType = "varchar(" + cf.getColumnLength() + ")";
break;
case "C":
columnType = "int(" + cf.getColumnLength() + ")";
break;
}
if (cf.getMrz() != null && !cf.getMrz().equals("")) {
if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT '" + cf.getMrz() + "'";
} else if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT " + cf.getMrz() + "";
} else if (cf.getColumnType().equals("C")) {
mrz = "DEFAULT " + cf.getMrz() + "";
}
}
columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz + " COMMENT '" + cf.getColumnName() + "' ";
}
PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn();
physicalTableColumn.setColumnName(cf.getColumnName());
physicalTableColumn.setColumnCode(cf.getColumnCode());
physicalTableColumn.setColumnLength(cf.getColumnLength());
physicalTableColumn.setColumnType(cf.getColumnType());
physicalTableColumn.setColumnCodetype(cf.getColumnCodetype());
physicalTableColumn.setBz(cf.getBz());
physicalTableColumn.setPxx(cf.getPxx());
physicalTableColumn.setLbx(cf.getLbx());
physicalTableColumn.setJmx(cf.getJmx());
physicalTableColumn.setJsx(cf.getJsx());
physicalTableColumn.setMrz(cf.getMrz());
physicalTableColumn.setShowType(cf.getShowType());
physicalTableColumn.setTableId(physicalTable.getId());
ptcList.add(physicalTableColumn);
}
columnsSql = columnsSql + ",PRIMARY KEY (`id`) USING BTREE ";
createSql = createSql + columnsSql + ") ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '" + archiveTypeName + "-文件表' ROW_FORMAT = Dynamic";
System.out.println("~~~createSql" + createSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql);
for (PhysicalTableColumn physicalTableColumn : ptcList) {
createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true);
}
}
public static void createFileTableSqlite(String code, String archiveTypeName, String archivetypeid) throws Exception {
String tableName = "t_ar_" + code + "_file";
tableName = tableName.toLowerCase();
PhysicalTable physicalTable = new PhysicalTable();
physicalTable.setTablename(tableName);
physicalTable.setShowname(archiveTypeName + "-文件表");
physicalTable.setTableCode("file");
physicalTable.setShoworder(Long.valueOf(2L));
physicalTable.setArchivetypeid(archivetypeid);
physicalTable.setArchivetypecode(code);
createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable);
List<PhysicalTableColumn> ptcList = new ArrayList<>();
ColumnFile cf1 = new ColumnFile();
List<ColumnFile> columnFileList = createTableAndInsertPhysicalTable.columnFileService.selectColumnFileList(cf1);
String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`";
String createSql = "create table " + tableName + " (";
String columnsSql = "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT";
for (int i = 0; i < columnFileList.size(); i++) {
ColumnFile cf = columnFileList.get(i);
if (cf != null) {
String columnType = "";
String mrz = "";
switch (cf.getColumnType()) {
case "D":
columnType = "TEXT(" + cf.getColumnLength() + ")";
break;
case "S":
columnType = "TEXT(" + cf.getColumnLength() + ")";
break;
case "C":
columnType = "INTEGER";
break;
}
if (cf.getMrz() != null && !cf.getMrz().equals("")) {
if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT '" + cf.getMrz() + "'";
} else if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT " + cf.getMrz() + "";
} else if (cf.getColumnType().equals("C")) {
mrz = "DEFAULT " + cf.getMrz() + "";
}
}
columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz;
}
PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn();
physicalTableColumn.setColumnName(cf.getColumnName());
physicalTableColumn.setColumnCode(cf.getColumnCode());
physicalTableColumn.setColumnLength(cf.getColumnLength());
physicalTableColumn.setColumnType(cf.getColumnType());
physicalTableColumn.setColumnCodetype(cf.getColumnCodetype());
physicalTableColumn.setBz(cf.getBz());
physicalTableColumn.setPxx(cf.getPxx());
physicalTableColumn.setLbx(cf.getLbx());
physicalTableColumn.setJmx(cf.getJmx());
physicalTableColumn.setJsx(cf.getJsx());
physicalTableColumn.setMrz(cf.getMrz());
physicalTableColumn.setShowType(cf.getShowType());
physicalTableColumn.setTableId(physicalTable.getId());
ptcList.add(physicalTableColumn);
}
createSql = createSql + columnsSql + ") ";
System.out.println("~~~createSql" + createSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql);
for (PhysicalTableColumn physicalTableColumn : ptcList) {
createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true);
}
}
public static void createDocumentTable(String code, String archiveTypeName, String archivetypeid) throws Exception {
String tableName = "t_ar_" + code + "_document";
tableName = tableName.toLowerCase();
PhysicalTable physicalTable = new PhysicalTable();
physicalTable.setTablename(tableName);
physicalTable.setShowname(archiveTypeName + "-全文表");
physicalTable.setTableCode("document");
physicalTable.setShoworder(Long.valueOf(3L));
physicalTable.setArchivetypeid(archivetypeid);
physicalTable.setArchivetypecode(code);
createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable);
List<PhysicalTableColumn> ptcList = new ArrayList<>();
List<ColumnDocument> columnDocumentList = createTableAndInsertPhysicalTable.columnDocumentService.selectColumnDocumentList(new ColumnDocument());
String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`";
String createSql = "create table " + tableName + " (";
String columnsSql = "`id` int(11) NOT NULL AUTO_INCREMENT";
for (int i = 0; i < columnDocumentList.size(); i++) {
ColumnDocument cf = columnDocumentList.get(i);
if (cf != null) {
String columnType = "";
String mrz = "";
switch (cf.getColumnType()) {
case "D":
columnType = "varchar(" + cf.getColumnLength() + ")";
break;
case "S":
columnType = "varchar(" + cf.getColumnLength() + ")";
break;
case "C":
columnType = "int(" + cf.getColumnLength() + ")";
break;
}
if (cf.getMrz() != null && !cf.getMrz().equals("")) {
if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT '" + cf.getMrz() + "'";
} else if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT " + cf.getMrz() + "";
} else if (cf.getColumnType().equals("C")) {
mrz = "DEFAULT " + cf.getMrz() + "";
}
}
columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz + " COMMENT '" + cf.getColumnName() + "' ";
}
PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn();
physicalTableColumn.setColumnName(cf.getColumnName());
physicalTableColumn.setColumnCode(cf.getColumnCode());
physicalTableColumn.setColumnLength(cf.getColumnLength());
physicalTableColumn.setColumnType(cf.getColumnType());
physicalTableColumn.setColumnCodetype(cf.getColumnCodetype());
physicalTableColumn.setBz(cf.getBz());
physicalTableColumn.setPxx(cf.getPxx());
physicalTableColumn.setLbx(cf.getLbx());
physicalTableColumn.setJmx(cf.getJmx());
physicalTableColumn.setJsx(cf.getJsx());
physicalTableColumn.setMrz(cf.getMrz());
physicalTableColumn.setShowType(cf.getShowType());
physicalTableColumn.setTableId(physicalTable.getId());
ptcList.add(physicalTableColumn);
}
columnsSql = columnsSql + ",PRIMARY KEY (`id`) USING BTREE ";
createSql = createSql + columnsSql + ") ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '" + archiveTypeName + "-全文表' ROW_FORMAT = Dynamic";
System.out.println("~~~createSql" + createSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql);
for (PhysicalTableColumn physicalTableColumn : ptcList) {
createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true);
}
}
public static void createDocumentTableSqlite(String code, String archiveTypeName, String archivetypeid) throws Exception {
String tableName = "t_ar_" + code + "_document";
tableName = tableName.toLowerCase();
PhysicalTable physicalTable = new PhysicalTable();
physicalTable.setTablename(tableName);
physicalTable.setShowname(archiveTypeName + "-全文表");
physicalTable.setTableCode("document");
physicalTable.setShoworder(Long.valueOf(3L));
physicalTable.setArchivetypeid(archivetypeid);
physicalTable.setArchivetypecode(code);
createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable);
List<PhysicalTableColumn> ptcList = new ArrayList<>();
List<ColumnDocument> columnDocumentList = createTableAndInsertPhysicalTable.columnDocumentService.selectColumnDocumentList(new ColumnDocument());
String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`";
String createSql = "create table " + tableName + " (";
String columnsSql = "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT";
for (int i = 0; i < columnDocumentList.size(); i++) {
ColumnDocument cf = columnDocumentList.get(i);
if (cf != null) {
String columnType = "";
String mrz = "";
switch (cf.getColumnType()) {
case "D":
columnType = "TEXT(" + cf.getColumnLength() + ")";
break;
case "S":
columnType = "TEXT(" + cf.getColumnLength() + ")";
break;
case "C":
columnType = "INTEGER";
break;
}
if (cf.getMrz() != null && !cf.getMrz().equals("")) {
if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT '" + cf.getMrz() + "'";
} else if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT " + cf.getMrz() + "";
} else if (cf.getColumnType().equals("C")) {
mrz = "DEFAULT " + cf.getMrz() + "";
}
}
columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz;
}
PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn();
physicalTableColumn.setColumnName(cf.getColumnName());
physicalTableColumn.setColumnCode(cf.getColumnCode());
physicalTableColumn.setColumnLength(cf.getColumnLength());
physicalTableColumn.setColumnType(cf.getColumnType());
physicalTableColumn.setColumnCodetype(cf.getColumnCodetype());
physicalTableColumn.setBz(cf.getBz());
physicalTableColumn.setPxx(cf.getPxx());
physicalTableColumn.setLbx(cf.getLbx());
physicalTableColumn.setJmx(cf.getJmx());
physicalTableColumn.setJsx(cf.getJsx());
physicalTableColumn.setMrz(cf.getMrz());
physicalTableColumn.setShowType(cf.getShowType());
physicalTableColumn.setTableId(physicalTable.getId());
ptcList.add(physicalTableColumn);
}
createSql = createSql + columnsSql + ") ";
System.out.println("~~~createSql" + createSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql);
for (PhysicalTableColumn physicalTableColumn : ptcList) {
createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true);
}
}
public static void createInfoTable(String code, String archiveTypeName, String archivetypeid) throws Exception {
String tableName = "t_ar_" + code + "_info";
tableName = tableName.toLowerCase();
PhysicalTable physicalTable = new PhysicalTable();
physicalTable.setTablename(tableName);
physicalTable.setShowname(archiveTypeName + "-过程表");
physicalTable.setTableCode("info");
physicalTable.setShoworder(Long.valueOf(4L));
physicalTable.setArchivetypeid(archivetypeid);
physicalTable.setArchivetypecode(code);
createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable);
List<PhysicalTableColumn> ptcList = new ArrayList<>();
List<ColumnInfo> columnInfoList = createTableAndInsertPhysicalTable.columnInfoService.selectColumnInfoList(new ColumnInfo());
String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`";
String createSql = "create table " + tableName + " (";
String columnsSql = "id int(11) NOT NULL AUTO_INCREMENT";
for (int i = 0; i < columnInfoList.size(); i++) {
ColumnInfo cf = columnInfoList.get(i);
if (cf != null) {
String columnType = "";
String mrz = "";
switch (cf.getColumnType()) {
case "D":
columnType = "varchar(" + cf.getColumnLength() + ")";
break;
case "S":
columnType = "varchar(" + cf.getColumnLength() + ")";
break;
case "C":
columnType = "int(" + cf.getColumnLength() + ")";
break;
}
if (cf.getMrz() != null && !cf.getMrz().equals("")) {
if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT '" + cf.getMrz() + "'";
} else if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT " + cf.getMrz() + "";
} else if (cf.getColumnType().equals("C")) {
mrz = "DEFAULT " + cf.getMrz() + "";
}
}
columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz + " COMMENT '" + cf.getColumnName() + "' ";
}
PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn();
physicalTableColumn.setColumnName(cf.getColumnName());
physicalTableColumn.setColumnCode(cf.getColumnCode());
physicalTableColumn.setColumnLength(cf.getColumnLength());
physicalTableColumn.setColumnType(cf.getColumnType());
physicalTableColumn.setColumnCodetype(cf.getColumnCodetype());
physicalTableColumn.setBz(cf.getBz());
physicalTableColumn.setPxx(cf.getPxx());
physicalTableColumn.setLbx(cf.getLbx());
physicalTableColumn.setJmx(cf.getJmx());
physicalTableColumn.setJsx(cf.getJsx());
physicalTableColumn.setMrz(cf.getMrz());
physicalTableColumn.setShowType(cf.getShowType());
physicalTableColumn.setTableId(physicalTable.getId());
ptcList.add(physicalTableColumn);
}
columnsSql = columnsSql + ",PRIMARY KEY (`id`) USING BTREE ";
createSql = createSql + columnsSql + ") ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '" + archiveTypeName + "-过程表' ROW_FORMAT = Dynamic";
System.out.println("~~~createSql" + createSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql);
for (PhysicalTableColumn physicalTableColumn : ptcList) {
createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true);
}
}
public static void createInfoTableSqlite(String code, String archiveTypeName, String archivetypeid) throws Exception {
String tableName = "t_ar_" + code + "_info";
tableName = tableName.toLowerCase();
PhysicalTable physicalTable = new PhysicalTable();
physicalTable.setTablename(tableName);
physicalTable.setShowname(archiveTypeName + "-过程表");
physicalTable.setTableCode("info");
physicalTable.setShoworder(Long.valueOf(4L));
physicalTable.setArchivetypeid(archivetypeid);
physicalTable.setArchivetypecode(code);
createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable);
List<PhysicalTableColumn> ptcList = new ArrayList<>();
List<ColumnInfo> columnInfoList = createTableAndInsertPhysicalTable.columnInfoService.selectColumnInfoList(new ColumnInfo());
String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`";
String createSql = "create table " + tableName + " (";
String columnsSql = "id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT";
for (int i = 0; i < columnInfoList.size(); i++) {
ColumnInfo cf = columnInfoList.get(i);
if (cf != null) {
String columnType = "";
String mrz = "";
switch (cf.getColumnType()) {
case "D":
columnType = "TEXT(" + cf.getColumnLength() + ")";
break;
case "S":
columnType = "TEXT(" + cf.getColumnLength() + ")";
break;
case "C":
columnType = "INTEGER";
break;
}
if (cf.getMrz() != null && !cf.getMrz().equals("")) {
if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT '" + cf.getMrz() + "'";
} else if (cf.getColumnType().equals("S")) {
mrz = "DEFAULT " + cf.getMrz() + "";
} else if (cf.getColumnType().equals("C")) {
mrz = "DEFAULT " + cf.getMrz() + "";
}
}
columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz;
}
PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn();
physicalTableColumn.setColumnName(cf.getColumnName());
physicalTableColumn.setColumnCode(cf.getColumnCode());
physicalTableColumn.setColumnLength(cf.getColumnLength());
physicalTableColumn.setColumnType(cf.getColumnType());
physicalTableColumn.setColumnCodetype(cf.getColumnCodetype());
physicalTableColumn.setBz(cf.getBz());
physicalTableColumn.setPxx(cf.getPxx());
physicalTableColumn.setLbx(cf.getLbx());
physicalTableColumn.setJmx(cf.getJmx());
physicalTableColumn.setJsx(cf.getJsx());
physicalTableColumn.setMrz(cf.getMrz());
physicalTableColumn.setShowType(cf.getShowType());
physicalTableColumn.setTableId(physicalTable.getId());
ptcList.add(physicalTableColumn);
}
createSql = createSql + columnsSql + ") ";
System.out.println("~~~createSql" + createSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql);
createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql);
for (PhysicalTableColumn physicalTableColumn : ptcList)
createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true);
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\CreateTableAndInsertPhysicalTable.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,11 @@
/* */ package com.archive.common.archiveUtil;
/* */
/* */ import com.archive.common.archiveUtil.ExcelUtilArchive;
/* */ import org.apache.poi.ss.usermodel.CellType;
/* */
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\ExcelUtilArchive$1.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,516 @@
package com.archive.common.archiveUtil;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class ExcelUtilArchive {
public static <T> void exportMultisheetExcel(String name, List<Map> mapList, HttpServletResponse response) {
BufferedOutputStream bos = null;
try {
String fileName = name + ".xlsx";
bos = getBufferedOutputStream(fileName, response);
doExport(mapList, bos);
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (bos != null) {
bos.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
public static List<Map<String, String>> readExcel(String filePath, Integer sheetIndex) {
List<Map<String, String>> dataList = new ArrayList<>();
Workbook wb = createWorkBook(filePath);
if (wb != null) {
Sheet sheet = wb.getSheetAt(sheetIndex.intValue());
int maxRownum = sheet.getPhysicalNumberOfRows();
Row firstRow = sheet.getRow(0);
int maxColnum = firstRow.getPhysicalNumberOfCells();
String[] columns = new String[maxColnum];
for (int i = 0; i < maxRownum; ) {
Map<String, String> map = null;
if (i > 0) {
map = new LinkedHashMap<>();
firstRow = sheet.getRow(i);
}
if (firstRow != null) {
String cellData = null;
for (int j = 0; j < maxColnum; j++) {
cellData = getCellFormatValue(firstRow.getCell(j));
if (i == 0) {
columns[j] = cellData;
} else {
map.put(columns[j], cellData);
}
}
if (i > 0)
dataList.add(map); i++;
}
}
}
try {
wb.close();
} catch (IOException e) {
e.printStackTrace();
}
return dataList;
}
public static int getSheetCount(String filePath) {
Workbook wb = createWorkBook(filePath);
int i = 0;
if (wb != null) {
Sheet whet1 = wb.getSheetAt(0);
if (whet1 != null) {
i++;
}
Sheet whet2 = wb.getSheetAt(1);
if (whet2 != null) {
i++;
}
}
try {
wb.close();
} catch (IOException e) {
e.printStackTrace();
}
return i;
}
public static String[] readExcelFirstRow(String filePath, Integer sheetIndex) {
String[] columns = null;
Workbook wb = createWorkBook(filePath);
if (wb != null) {
Sheet sheet = wb.getSheetAt(sheetIndex.intValue());
Row firstRow = sheet.getRow(0);
int maxColnum = firstRow.getPhysicalNumberOfCells();
columns = new String[maxColnum];
if (firstRow != null) {
String cellData = null;
for (int j = 0; j < maxColnum; j++) {
cellData = getCellFormatValue(firstRow.getCell(j));
if (!cellData.equals("") && !cellData.trim().equals("") && !cellData.equals("请选择")) {
columns[j] = cellData;
}
}
}
}
try {
wb.close();
} catch (IOException e) {
e.printStackTrace();
}
return columns;
}
private static BufferedOutputStream getBufferedOutputStream(String fileName, HttpServletResponse response) throws Exception {
response.setContentType("application/x-msdownload");
response.setHeader("Content-Disposition", "attachment;filename=" + new String(fileName
.getBytes("gb2312"), "ISO8859-1"));
return new BufferedOutputStream((OutputStream)response.getOutputStream());
}
private static <T> void doExport(List<Map> mapList, OutputStream outputStream) {
int maxBuff = 100;
SXSSFWorkbook wb = new SXSSFWorkbook(maxBuff);
try {
for (int i = 0; i < mapList.size(); i++) {
Map map = mapList.get(i);
String[] headers = (String[])map.get("headers");
Collection<T> dataList = (Collection<T>)map.get("dataList");
String fileName = (String)map.get("fileName");
createSheet(wb, null, headers, dataList, fileName, maxBuff);
}
if (outputStream != null) {
wb.write(outputStream);
}
} catch (Exception ex) {
ex.printStackTrace();
} finally {
try {
wb.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
private static <T> void createSheet(SXSSFWorkbook wb, String[] exportFields, String[] headers, Collection<T> dataList, String fileName, int maxBuff) throws NoSuchFieldException, IllegalAccessException, IOException {
SXSSFSheet sXSSFSheet = wb.createSheet(fileName);
CellStyle style = wb.createCellStyle();
CellStyle style2 = wb.createCellStyle();
Font font = wb.createFont();
font.setFontName("微软雅黑");
font.setFontHeightInPoints((short)11);
style.setFont(font);
style2.setFont(font);
Row headerRow = sXSSFSheet.createRow(0);
int headerSize = headers.length;
for (int cellnum = 0; cellnum < headerSize; cellnum++) {
Cell cell = headerRow.createCell(cellnum);
cell.setCellStyle(style);
sXSSFSheet.setColumnWidth(cellnum, 4000);
cell.setCellValue(headers[cellnum]);
}
int rownum = 0;
Iterator<T> iterator = dataList.iterator();
while (iterator.hasNext()) {
T data = iterator.next();
Row row = sXSSFSheet.createRow(rownum + 1);
Field[] fields = getExportFields(data.getClass(), exportFields);
for (int i = 0; i < headerSize; i++) {
Cell cell = row.createCell(i);
cell.setCellStyle(style2);
Field field = fields[i];
setData(field, data, field.getName(), cell);
}
rownum = sXSSFSheet.getLastRowNum();
if (rownum % maxBuff == 0) {
sXSSFSheet.flushRows(maxBuff);
}
}
}
private static <T> void doExport(String[] headers, String[] exportFields, Collection<T> dataList, String fileName, OutputStream outputStream) {
int maxBuff = 100;
SXSSFWorkbook wb = new SXSSFWorkbook(maxBuff);
try {
createSheet(wb, exportFields, headers, dataList, fileName, maxBuff);
if (outputStream != null) {
wb.write(outputStream);
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
private static <T> Field getDataField(T object, String property) throws NoSuchFieldException, IllegalAccessException {
if (property.contains(".")) {
String p = property.substring(0, property.indexOf("."));
Field field = object.getClass().getDeclaredField(p);
return field;
}
Field dataField = object.getClass().getDeclaredField(property);
return dataField;
}
private static Field[] getExportFields(Class<?> targetClass, String[] exportFieldNames) {
Field[] fields = null;
if (exportFieldNames == null || exportFieldNames.length < 1) {
fields = targetClass.getDeclaredFields();
} else {
fields = new Field[exportFieldNames.length];
for (int i = 0; i < exportFieldNames.length; i++) {
try {
fields[i] = targetClass.getDeclaredField(exportFieldNames[i]);
} catch (Exception e) {
try {
fields[i] = targetClass.getSuperclass().getDeclaredField(exportFieldNames[i]);
} catch (Exception e1) {
throw new IllegalArgumentException("无法获取导出字段", e);
}
}
}
}
return fields;
}
private static <T> void setData(Field dataField, T object, String property, Cell cell) throws IllegalAccessException, NoSuchFieldException {
dataField.setAccessible(true);
Object val = dataField.get(object);
Sheet sh = cell.getSheet();
CellStyle style = cell.getCellStyle();
int cellnum = cell.getColumnIndex();
if (val != null) {
if (dataField.getType().toString().endsWith("String")) {
cell.setCellValue((String)val);
} else if (dataField.getType().toString().endsWith("Integer") || dataField.getType().toString().endsWith("int")) {
cell.setCellValue(((Integer)val).intValue());
} else if (dataField.getType().toString().endsWith("Long") || dataField.getType().toString().endsWith("long")) {
cell.setCellValue(val.toString());
} else if (dataField.getType().toString().endsWith("Double") || dataField.getType().toString().endsWith("double")) {
cell.setCellValue(((Double)val).doubleValue());
} else if (dataField.getType().toString().endsWith("Date")) {
DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
cell.setCellValue(format.format((Date)val));
} else if (dataField.getType().toString().endsWith("List")) {
List list1 = (List)val;
int size = list1.size();
for (int i = 0; i < size; i++)
{
int start = property.indexOf(dataField.getName()) + dataField.getName().length() + 1;
String tempProperty = property.substring(start, property.length());
Field field = getDataField(list1.get(i), tempProperty);
Cell tempCell = cell;
if (i > 0) {
int rowNum = cell.getRowIndex() + i;
Row row = sh.getRow(rowNum);
if (row == null) {
row = sh.createRow(rowNum);
for (int j = 0; j < cell.getColumnIndex(); j++) {
sh.addMergedRegion(new CellRangeAddress(cell.getRowIndex(), cell.getRowIndex() + size - 1, j, j));
Cell c = row.createCell(j);
c.setCellStyle(style);
}
}
tempCell = row.createCell(cellnum);
tempCell.setCellStyle(style);
}
setData(field, list1.get(i), tempProperty, tempCell);
}
} else if (property.contains(".")) {
String p = property.substring(property.indexOf(".") + 1, property.length());
Field field = getDataField(val, p);
setData(field, val, p, cell);
} else {
cell.setCellValue(val.toString());
}
}
}
private static Workbook createWorkBook(String filePath) {
XSSFWorkbook xSSFWorkbook;
Workbook wb = null;
if (filePath == null) {
return null;
}
String extString = filePath.substring(filePath.lastIndexOf("."));
InputStream is = null;
try {
is = new FileInputStream(filePath);
if (".xls".equals(extString)) {
HSSFWorkbook hSSFWorkbook; return (Workbook)(hSSFWorkbook = new HSSFWorkbook(is));
} if (".xlsx".equals(extString)) {
return (Workbook)(xSSFWorkbook = new XSSFWorkbook(is));
}
return (Workbook)xSSFWorkbook;
}
catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return (Workbook)xSSFWorkbook;
}
public static String getCellFormatValue(Cell cell) {
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
String cellValue = "";
if (cell == null) {
return cellValue;
}
CellType cellType = cell.getCellTypeEnum();
if (cellType == CellType.NUMERIC) {
cell.setCellType(CellType.STRING);
}
switch (null.$SwitchMap$org$apache$poi$ss$usermodel$CellType[cellType.ordinal()])
{
case 1:
cellValue = String.valueOf(cell.getStringCellValue());
return cellValue;case 2: cellValue = String.valueOf(cell.getStringCellValue()); return cellValue;case 3: cellValue = String.valueOf(cell.getBooleanCellValue()); return cellValue;case 4: cellValue = String.valueOf(cell.getCellFormula()); return cellValue;case 5: cellValue = cell.getStringCellValue(); return cellValue;case 6: cellValue = "非法字符"; return cellValue; } cellValue = "未知类型"; return cellValue;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\ExcelUtilArchive.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,32 @@
package com.archive.common.archiveUtil;
public class FileUtils
{
public static String changeValueType(Long dataSize) {
String valueType = new String();
String[] type = { "KB", "MB", "GB", "TB", "PB" };
int p = 0;
if (dataSize.longValue() == 0L) {
valueType = dataSize + type[p];
} else {
Double value = Double.valueOf(dataSize.longValue() * 1.0D / 1024.0D);
while (value.doubleValue() >= 1024.0D) {
value = Double.valueOf(value.doubleValue() / 1024.0D);
p++;
}
valueType = String.format("%.2f", new Object[] { value }) + type[p];
}
return valueType;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\FileUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,499 @@
package com.archive.common.archiveUtil;
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
import java.awt.image.ImageObserver;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Iterator;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;
import javax.imageio.stream.ImageInputStream;
import javax.swing.ImageIcon;
public class ImageWaterMarkUtil
{
public static void markImageByWriting(String srcImgPath, String targerPath, String waterMarkContent, Color markContentColor, String scripts, String styles, int fontSize, Integer degree, float alpha, int xmove, int ymove) {
try {
String[] waterMarkContents = waterMarkContent.split("\\|\\|");
File srcImgFile = new File(srcImgPath);
Image srcImg = ImageIO.read(srcImgFile);
int srcImgWidth = srcImg.getWidth(null);
int srcImgHeight = srcImg.getHeight(null);
BufferedImage bufImg = new BufferedImage(srcImgWidth, srcImgHeight, 1);
Graphics2D g = bufImg.createGraphics();
g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null);
int sty = getStyle(styles);
Font font = new Font(scripts, sty, fontSize);
g.setComposite(AlphaComposite.getInstance(10, alpha));
g.setColor(markContentColor);
g.setFont(font);
g.rotate(Math.toRadians(degree.intValue()), bufImg.getWidth() / 2.0D, bufImg.getHeight() / 2.0D);
int maxLen = 0;
int maxHigh = 0;
for (int i = 0; i < waterMarkContents.length; i++) {
waterMarkContent = waterMarkContents[i];
int fontlen = g.getFontMetrics(g.getFont()).charsWidth(waterMarkContent.toCharArray(), 0, waterMarkContent.length());
if (fontlen >= maxLen) {
maxLen = fontlen;
}
maxHigh = maxHigh + (i + 1) * fontSize + 10;
}
int line = srcImgWidth * 2 / maxLen;
int co = srcImgHeight * 2 / maxHigh;
int yz = 0;
for (int a = 0; a < co; a++) {
int t = 0;
for (int j = 0; j < waterMarkContents.length; j++) {
waterMarkContent = waterMarkContents[j];
int y = (j + 1) * fontSize + 10 + t;
int tempX = -srcImgWidth / 2;
int tempY = -srcImgHeight / 2 + y + yz;
int tempCharLen = 0;
int tempLineLen = 0;
StringBuffer sb = new StringBuffer();
for (int k = 0; k < waterMarkContent.length(); k++) {
char tempChar = waterMarkContent.charAt(k);
tempCharLen = g.getFontMetrics(g.getFont()).charWidth(tempChar);
tempLineLen += tempCharLen;
if (tempLineLen >= srcImgWidth) {
g.drawString(sb.toString(), tempX, tempY);
t += fontSize;
sb.delete(0, sb.length());
tempY += fontSize;
tempLineLen = 0;
}
sb.append(tempChar);
}
for (int z = 0; z < line; z++) {
g.drawString(sb.toString(), tempX, tempY);
tempX = tempX + maxLen + xmove;
}
}
yz = yz + maxHigh + ymove;
}
g.dispose();
File targetFile = new File(targerPath);
if (!targetFile.getParentFile().exists()) {
targetFile.getParentFile().mkdirs();
}
String format = getFormatName(new File(srcImgPath));
FileOutputStream outImgStream = new FileOutputStream(targerPath);
ImageIO.write(bufImg, format, outImgStream);
outImgStream.flush();
outImgStream.close();
System.out.println("**********图片完成添加文字水印工作**********");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void markImageByWriting(String srcImgPath, String targerPath, String waterMarkContent, Color markContentColor, String scripts, String styles, int fontSize, Integer degree, float alpha, String watermarkPosition, Integer left, Integer top) {
try {
File srcImgFile = new File(srcImgPath);
Image srcImg = ImageIO.read(srcImgFile);
int srcImgWidth = srcImg.getWidth(null);
int srcImgHeight = srcImg.getHeight(null);
BufferedImage bufImg = new BufferedImage(srcImgWidth, srcImgHeight, 1);
Graphics2D g = bufImg.createGraphics();
g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null);
int sty = getStyle(styles);
Font font = new Font(scripts, sty, fontSize);
g.setComposite(AlphaComposite.getInstance(10, alpha));
g.setColor(markContentColor);
g.setFont(font);
g.rotate(Math.toRadians(degree.intValue()), bufImg.getWidth() / 2.0D, bufImg.getHeight() / 2.0D);
int markLength = g.getFontMetrics(g.getFont()).charsWidth(waterMarkContent.toCharArray(), 0, waterMarkContent.length());
int x = left.intValue();
int y = top.intValue();
if (x == 0 && y == 0) {
switch (watermarkPosition) {
case "topLeft":
x = 0;
y = 0 + fontSize;
break;
case "topRight":
x = srcImgWidth - markLength;
y = 0 + fontSize;
break;
case "topCenter":
x = (srcImgWidth - markLength) / 2;
y = 0 + fontSize;
break;
case "center":
x = (srcImgWidth - markLength) / 2;
y = (srcImgHeight - fontSize) / 2;
break;
case "centerLeft":
x = 0;
y = (srcImgHeight - fontSize) / 2;
break;
case "centerRight":
x = srcImgWidth - markLength;
y = (srcImgHeight - fontSize) / 2;
break;
case "bottomLeft":
x = 0;
y = srcImgHeight - 3;
break;
case "bottomCenter":
x = (srcImgWidth - markLength) / 2;
y = srcImgHeight - 3;
break;
case "bottomRight":
x = srcImgWidth - markLength - 3;
y = srcImgHeight - 3;
break;
default:
x = srcImgWidth - markLength - 3;
y = srcImgHeight - 3;
break;
}
}
g.drawString(waterMarkContent, x, y);
g.dispose();
File targetFile = new File(targerPath);
if (!targetFile.getParentFile().exists()) {
targetFile.getParentFile().mkdirs();
}
String format = getFormatName(new File(srcImgPath));
FileOutputStream outImgStream = new FileOutputStream(targerPath);
ImageIO.write(bufImg, format, outImgStream);
outImgStream.flush();
outImgStream.close();
System.out.println("**********图片完成添加文字水印工作**********");
} catch (Exception e) {
e.printStackTrace();
}
}
public static int getStyle(String styles) {
switch (styles)
{ case "普通":
sty = 0;
return sty;case "加粗": sty = 1; return sty;case "斜体": sty = 2; return sty;case "粗斜体": sty = 3; return sty; } int sty = 0; return sty;
}
public static void markImageByIcon(String iconPath, String srcImgPath, String targerPath, Integer degree, float alpha, Integer left, Integer top) {
OutputStream os = null;
try {
Image srcImg = ImageIO.read(new File(srcImgPath));
BufferedImage buffImg = new BufferedImage(srcImg.getWidth(null), srcImg.getHeight(null), 1);
Graphics2D g = buffImg.createGraphics();
g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g.drawImage(srcImg.getScaledInstance(srcImg.getWidth(null), srcImg.getHeight(null), 4), 0, 0, (ImageObserver)null);
if (null != degree)
{
g.rotate(Math.toRadians(degree.intValue()), buffImg
.getWidth() / 2.0D, buffImg
.getHeight() / 2.0D);
}
ImageIcon imgIcon = new ImageIcon(iconPath);
Image img = imgIcon.getImage();
g.setComposite(AlphaComposite.getInstance(10, alpha));
g.drawImage(img, left.intValue(), top.intValue(), (ImageObserver)null);
g.setComposite(AlphaComposite.getInstance(3));
g.dispose();
File targetFile = new File(targerPath);
if (!targetFile.getParentFile().exists()) {
targetFile.getParentFile().mkdirs();
}
String format = getFormatName(new File(srcImgPath));
os = new FileOutputStream(targerPath);
ImageIO.write(buffImg, format, os);
System.out.println("**********图片完成添加图片水印工作**********");
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (null != os)
os.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
public static void markImageByIcon(String iconPath, String srcImgPath, String targerPath, Integer degree, float alpha, String watermarkPosition) {
OutputStream os = null; try {
int x, y;
Image srcImg = ImageIO.read(new File(srcImgPath));
BufferedImage buffImg = new BufferedImage(srcImg.getWidth(null), srcImg.getHeight(null), 1);
int srcWidth = srcImg.getWidth(null);
int srcHeight = srcImg.getHeight(null);
Graphics2D g = buffImg.createGraphics();
g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g.drawImage(srcImg
.getScaledInstance(srcImg.getWidth(null), srcImg
.getHeight(null), 4), 0, 0, (ImageObserver)null);
if (null != degree) {
g.rotate(Math.toRadians(degree.intValue()), buffImg
.getWidth() / 2.0D, buffImg
.getHeight() / 2.0D);
}
ImageIcon imgIcon = new ImageIcon(iconPath);
Image img = imgIcon.getImage();
int watermarkImageWidth = img.getWidth(null);
int watermarkImageHeight = img.getHeight(null);
g.setComposite(AlphaComposite.getInstance(10, alpha));
switch (watermarkPosition) {
case "topLeft":
x = 0;
y = 0;
break;
case "topRight":
x = srcWidth - watermarkImageWidth;
y = 0;
break;
case "topCenter":
x = (srcWidth - watermarkImageWidth) / 2;
y = 0;
break;
case "center":
x = (srcWidth - watermarkImageWidth) / 2;
y = (srcHeight - watermarkImageHeight) / 2;
break;
case "centerLeft":
x = 0;
y = (srcHeight - watermarkImageHeight) / 2;
break;
case "centerRight":
x = srcWidth - watermarkImageWidth;
y = (srcHeight - watermarkImageHeight) / 2;
break;
case "bottomLeft":
x = 0;
y = srcHeight - watermarkImageHeight;
break;
case "bottomCenter":
x = (srcWidth - watermarkImageWidth) / 2;
y = srcHeight - watermarkImageHeight;
break;
case "bottomRight":
x = srcWidth - watermarkImageWidth;
y = srcHeight - watermarkImageHeight;
break;
default:
x = srcWidth - watermarkImageWidth;
y = srcHeight - watermarkImageHeight;
break;
}
g.drawImage(img, x, y, (ImageObserver)null);
g.setComposite(AlphaComposite.getInstance(3));
g.dispose();
File targetFile = new File(targerPath);
if (!targetFile.getParentFile().exists()) {
targetFile.getParentFile().mkdirs();
}
String format = getFormatName(new File(srcImgPath));
os = new FileOutputStream(targerPath);
ImageIO.write(buffImg, format, os);
System.out.println("**********图片完成添加图片水印工作**********");
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (null != os)
os.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
public static String getFormatName(File file) {
ImageInputStream iis = null;
ImageReader reader = null;
try {
iis = ImageIO.createImageInputStream(file);
Iterator<ImageReader> iter = ImageIO.getImageReaders(iis);
if (!iter.hasNext()) {
return null;
}
reader = iter.next();
return reader.getFormatName();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (iis != null) {
iis.close();
}
if (reader != null) {
reader.dispose();
}
} catch (IOException e) {
e.printStackTrace();
}
}
return null;
}
public static void main(String[] args) {
String iconPath = "C:\\Users\\18291\\Desktop\\watermark\\watermark2.png";
String srcImgPath = "C:\\Users\\18291\\Desktop\\watermark\\c8.jpg";
String targerPath = "C:\\Users\\18291\\Desktop\\watermark\\1\\2\\c1.jpg";
String contont = "Font类是用于设置图形用户界面上的字体样式";
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\ImageWaterMarkUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,28 @@
package com.archive.common.archiveUtil;
import org.apache.commons.codec.digest.HmacUtils;
public class LicenseGenerator
{
public static String generateLicense(String macAddress) {
String license = HmacUtils.hmacSha256Hex("tale", macAddress);
return license;
}
private static final String LICENSE_SECRET_KEY = "tale";
public static String licenseGetMac(String macAddress) {
String license = HmacUtils.hmacSha256Hex("tale", macAddress);
return license;
}
public static void main(String[] args) {
String macAddress = "00:1A:2B:3C:4D:5E";
String license = generateLicense(macAddress);
System.out.println("Generated License: " + license);
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\LicenseGenerator.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,231 @@
package com.archive.common.archiveUtil;
import com.archive.common.utils.DateUtils;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.Enumeration;
import java.util.List;
public class MacUtil
{
public static List<String> getMACAddressByWindows() throws Exception {
ArrayList<String> rs = new ArrayList<>();
String result = "";
Process process = Runtime.getRuntime().exec("ipconfig /all");
BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream(), "GBK"));
int index = -1;
String line;
while ((line = br.readLine()) != null) {
index = line.indexOf("物理地址");
if (index >= 0) {
index = line.indexOf(":");
if (index >= 0) {
result = line.substring(index + 1).trim();
}
rs.add(result.toUpperCase());
}
}
br.close();
return rs;
}
public static List<String> getMacIds() {
InetAddress ip = null;
NetworkInterface ni = null;
List<String> macList = new ArrayList<>();
try {
Enumeration<NetworkInterface> netInterfaces = NetworkInterface.getNetworkInterfaces();
while (netInterfaces.hasMoreElements()) {
ni = netInterfaces.nextElement();
Enumeration<InetAddress> ips = ni.getInetAddresses();
while (ips.hasMoreElements()) {
ip = ips.nextElement();
if (!ip.isLoopbackAddress() && ip
.getHostAddress().matches("(\\d{1,3}\\.){3}\\d{1,3}"))
{
macList.add(getMacFromBytes(ni.getHardwareAddress()));
}
}
}
} catch (Exception e) {
System.out.println("出现异常" + e.getMessage());
}
return macList;
}
private static String getMacFromBytes(byte[] bytes) {
StringBuffer mac = new StringBuffer();
boolean first = false;
for (byte b : bytes) {
if (first) {
mac.append(":");
}
byte currentByte = (byte)((b & 0xF0) >> 4);
mac.append(Integer.toHexString(currentByte));
currentByte = (byte)(b & 0xF);
mac.append(Integer.toHexString(currentByte));
first = true;
}
System.out.println(mac.toString());
return mac.toString();
}
public static List<String> getMacAddress() {
ArrayList<String> macs = new ArrayList<>();
try {
Enumeration<NetworkInterface> allNetInterfaces = NetworkInterface.getNetworkInterfaces();
byte[] mac = null;
while (allNetInterfaces.hasMoreElements()) {
NetworkInterface netInterface = allNetInterfaces.nextElement();
if (netInterface.isLoopback() || netInterface.isVirtual() || netInterface.isPointToPoint() || !netInterface.isUp()) {
continue;
}
mac = netInterface.getHardwareAddress();
if (mac != null) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < mac.length; i++) {
sb.append(String.format("%02X%s", new Object[] { Byte.valueOf(mac[i]), (i < mac.length - 1) ? ":" : "" }));
}
if (sb.length() > 0) {
macs.add(sb.toString().toLowerCase());
}
}
}
return macs;
} catch (Exception e) {
System.out.println("MAC地址获取失败" + e.getMessage());
return Collections.emptyList();
}
}
public static String getMAC() throws SocketException {
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
while (networkInterfaces.hasMoreElements()) {
NetworkInterface network = networkInterfaces.nextElement();
byte[] mac = network.getHardwareAddress();
if (mac == null) {
System.out.println("mac为空");
continue;
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < mac.length; i++) {
sb.append(String.format("%02X%s", new Object[] { Byte.valueOf(mac[i]), (i < mac.length - 1) ? "-" : "" }));
}
if (!"".equals(sb.toString())) {
return sb.toString();
}
}
return "";
}
public static boolean sqjy(String mac, String ckDate, int shqx) throws Exception {
boolean res = false;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String osName = System.getProperty("os.name").toLowerCase();
System.out.println("操作系统:" + osName);
if (osName.contains("windows")) {
List<String> list = getMACAddressByWindows();
if (list.contains(mac)) {
res = true;
}
} else if (osName.contains("linux")) {
List<String> list = getMacIds();
if (list.contains(mac)) {
res = true;
}
} else if (osName.contains("uos")) {
List<String> list = getMacAddress();
if (list.contains(mac)) {
res = true;
}
} else if (osName.contains("kylin")) {
String mac1 = getMAC();
if (mac1.equals(mac)) {
res = true;
}
}
if (res == true) {
System.out.println("mac地址校验通过");
if (shqx == 0) {
System.out.println("授权期限校验通过,永久授权");
} else {
Date dqsj = DateUtils.addDays(sdf.parse(ckDate), shqx);
if (dqsj.after(new Date())) {
res = true;
System.out.println("系统授权期限为:" + shqx + "天,到期时间:" + sdf.format(dqsj));
} else {
System.out.println("系统授权期限为:" + shqx + "天,出库时间:" + ckDate + ",到期时间:" + sdf.format(dqsj));
System.out.println("系统授权已过期,请联系商务进行授权!");
res = false;
}
}
} else {
System.out.println("mac地址校验失败,请核实授权MAC是否正确");
}
return res;
}
public static void main(String[] args) throws Exception {
String osName = System.getProperty("os.name").toLowerCase();
System.out.println(osName);
if (osName.contains("windows")) {
List<String> list = getMACAddressByWindows();
for (int i = 0; i < list.size(); i++)
System.out.println(list.get(i));
}
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\MacUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,218 @@
package com.archive.common.archiveUtil;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.tika.exception.TikaException;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.parser.AutoDetectParser;
import org.apache.tika.parser.ParseContext;
import org.apache.tika.sax.BodyContentHandler;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
public class MetadataUtil
{
public static List<Map<String, String>> getMetadataAllByFile(String path) {
List<Map<String, String>> list = new ArrayList<>();
File file = new File(path);
AutoDetectParser autoDetectParser = new AutoDetectParser();
BodyContentHandler handler = new BodyContentHandler(Integer.parseInt(String.valueOf(file.length())));
Metadata metadata = new Metadata();
FileInputStream inputstream = null;
try {
inputstream = new FileInputStream(file);
ParseContext context = new ParseContext();
autoDetectParser.parse(inputstream, (ContentHandler)handler, metadata, context);
String[] metadataNames = metadata.names();
for (String name : metadataNames) {
if (name.indexOf("tiff") == -1 && name.indexOf("Exif") == -1 && name
.indexOf("X-Parsed-By") == -1 && name
.indexOf("File Name") == -1 && name
.indexOf("Component ") == -1 && name
.indexOf("meta:") == -1 &&
!name.equals("date") && name
.indexOf("dcterms:") == -1) {
Map<String, String> map = new HashMap<>();
map.put("propety", ConverChinaText(name));
map.put("propetyValue", metadata.get(name));
list.add(map);
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
if (inputstream != null) {
try {
inputstream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return list;
}
public static void main(String[] args) throws IOException, TikaException, SAXException {
File file = new File("C:\\Users\\Administrator\\Downloads\\20221104091635.pdf");
AutoDetectParser autoDetectParser = new AutoDetectParser();
BodyContentHandler handler = new BodyContentHandler();
Metadata metadata = new Metadata();
FileInputStream inputstream = new FileInputStream(file);
ParseContext context = new ParseContext();
autoDetectParser.parse(inputstream, (ContentHandler)handler, metadata, context);
String[] metadataNames = metadata.names();
for (String name : metadataNames) {
if (name.indexOf("tiff") == -1 && name.indexOf("Exif") == -1 && name
.indexOf("X-Parsed-By") == -1 && name
.indexOf("File Name") == -1 && name
.indexOf("Component ") == -1 && name
.indexOf("meta:") == -1 &&
!name.equals("date") && name
.indexOf("dcterms:") == -1) {
System.out.println(ConverChinaText(name) + ": " + metadata.get(name));
}
}
}
public static String ConverChinaText(String name) {
String res = name;
if (name.contains("Y Resolution")) {
res = "Y轴分辨率(Y Resolution)";
} else if (name.contains("X Resolution")) {
res = "X轴分辨率(X Resolution)";
} else if (name.contains("Image Width")) {
res = "宽度(Image Width)";
} else if (name.contains("Image Height")) {
res = "高度(Image Height)";
} else if (name.contains("Number of Tables")) {
res = "表格数量(Number of Tables)";
} else if (name.contains("Compression Type")) {
res = "压缩方式(Compression Type)";
} else if (name.contains("Data Precision")) {
res = "数据精度(Data Precision)";
} else if (name.contains("Number of Components")) {
res = "部件数量(Number of Components)";
} else if (name.contains("File Size")) {
res = "文件大小(File Size)";
} else if (name.contains("Color Space")) {
res = "色彩空间(" + name + ")";
} else if (name.contains("Exif Version")) {
res = "Exif版本(" + name + ")";
} else if (name.contains("Thumbnail Offset")) {
res = "缩略图偏移(" + name + ")";
} else if (name.contains("Resolution Unit")) {
res = "分辨率单位(" + name + ")";
} else if (name.contains("BitsPerSample")) {
res = "每个样本位数(" + name + ")";
} else if (name.contains("Caption Digest")) {
res = "标题摘要(" + name + ")";
} else if (name.contains("Content-Type")) {
res = "内容类型(" + name + ")";
} else if (name.contains("File Modified Date")) {
res = "文件修改日期(" + name + ")";
} else if (name.contains("YCbCr Positioning")) {
res = "YCbCr位置(" + name + ")";
} else if (name.contains("Thumbnail Width Pixels")) {
res = "缩略图宽度像素(" + name + ")";
} else if (name.contains("Thumbnail Length")) {
res = "缩略图长度(" + name + ")";
} else if (name.contains("Orientation")) {
res = "方向(" + name + ")";
} else if (name.contains("FlashPix Version")) {
res = "FlashPix版本(" + name + ")";
}
else if (name.contains("PDFVersion")) {
res = "PDF版本(" + name + ")";
} else if (name.contains("hasXFA")) {
res = "是否有XFA(" + name + ")";
} else if (name.contains("access_permission:modify_annotations")) {
res = "访问权限-修改注释(" + name + ")";
} else if (name.contains("access_permission:can_print_degraded")) {
res = "访问权限-分级打印(" + name + ")";
} else if (name.contains("created")) {
res = "创建时间(" + name + ")";
} else if (name.contains("Last-Modified")) {
res = "最后修改时间(" + name + ")";
} else if (name.contains("modified")) {
res = "修改时间(" + name + ")";
} else if (name.contains("dc:format")) {
res = "格式(" + name + ")";
} else if (name.contains("Last-Save-Date")) {
res = "最后保存时间(" + name + ")";
} else if (name.contains("access_permission:fill_in_form")) {
res = "访问权限-填充表单(" + name + ")";
} else if (name.contains("access_permission:fill_in_form")) {
res = "访问权限-填充表单(" + name + ")";
} else if (name.contains("producer")) {
res = "制作者(" + name + ")";
} else if (name.contains("access_permission:can_print")) {
res = "访问权限-可打印(" + name + ")";
} else if (name.contains("access_permission:extract_content")) {
res = "访问权限-提取内容(" + name + ")";
}
else if (name.contains("access_permission:assemble_document")) {
res = "访问权限-汇编文档(" + name + ")";
} else if (name.contains("access_permission:extract_for_accessibility")) {
res = "访问权限-可访问性提取(" + name + ")";
} else if (name.contains("xmpTPg:NPages")) {
res = "页数(" + name + ")";
} else if (name.contains("access_permission:can_modify")) {
res = "访问权限-可修改(" + name + ")";
} else if (name.contains("Creation-Date")) {
res = "创建时间(" + name + ")";
} else if (name.contains("pdf:hasXMP")) {
res = "是否有XMP(" + name + ")";
} else if (name.contains("pdf:charsPerPage")) {
res = "每页字符数(" + name + ")";
} else if (name.contains("pdf:hasMarkedContent")) {
res = "包含标记内容(" + name + ")";
} else if (name.contains("pdf:encrypted")) {
res = "是否加密(" + name + ")";
} else if (name.contains("pdf:unmappedUnicodeCharsPerPage")) {
res = "每页未知字符(" + name + ")";
}
return res;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\MetadataUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,382 @@
package com.archive.common.archiveUtil;
import com.itextpdf.text.Image;
import com.itextpdf.text.Rectangle;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfContentByte;
import com.itextpdf.text.pdf.PdfGState;
import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.PdfStamper;
import java.awt.Font;
import java.awt.FontMetrics;
import java.io.File;
import java.io.FileOutputStream;
import sun.font.FontDesignMetrics;
public class PdfWaterMarkUtil
{
private static int interval = 20;
public static void waterMarkforWriting(String inputFile, String outputFile, String waterMarkName, Integer degree, float alpha, int fontSize) {
try {
File file = new File(outputFile);
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
PdfReader reader = new PdfReader(inputFile);
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(outputFile));
BaseFont base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", true);
Rectangle pageRect = null;
PdfGState gs = new PdfGState();
gs.setFillOpacity(alpha);
int total = reader.getNumberOfPages() + 1;
FontMetrics metrics = FontDesignMetrics.getMetrics(new Font("宋体", 0, fontSize));
int textH = metrics.getHeight();
int textW = metrics.stringWidth(waterMarkName);
for (int i = 1; i < total; i++) {
pageRect = reader.getPageSizeWithRotation(i);
PdfContentByte under = stamper.getOverContent(i);
under.saveState();
under.setGState(gs);
under.beginText();
under.setFontAndSize(base, fontSize);
int height;
for (height = interval + textH; height < pageRect.getHeight(); height += textH * 3) {
int width; for (width = interval + textW; width < pageRect.getWidth() + textW; width += textW * 2) {
under.showTextAligned(0, waterMarkName, height, width, degree.intValue());
}
}
under.endText();
}
stamper.close();
reader.close();
System.out.println("**********PDF完成添加文字水印工作**********");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void waterMarkforWriting(String inputFile, String outputFile, String waterMarkName, Integer degree, float alpha, int fontSize, String watermarkPosition, Integer left, Integer top) {
try {
File file = new File(outputFile);
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
PdfReader reader = new PdfReader(inputFile);
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(outputFile));
BaseFont base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", true);
Rectangle pageRect = null;
PdfGState gs = new PdfGState();
gs.setFillOpacity(alpha);
int total = reader.getNumberOfPages() + 1;
FontMetrics metrics = FontDesignMetrics.getMetrics(new Font("宋体", 0, fontSize));
int textH = metrics.getHeight();
int textW = metrics.stringWidth(waterMarkName);
for (int i = 1; i < total; i++) {
pageRect = reader.getPageSizeWithRotation(i);
PdfContentByte under = stamper.getOverContent(i);
under.saveState();
under.setGState(gs);
under.beginText();
under.setFontAndSize(base, fontSize);
int pdfWidth = (int)pageRect.getWidth();
int pdfHeight = (int)pageRect.getHeight();
int x = left.intValue();
int y = top.intValue();
if (x == 0 && y == 0) {
switch (watermarkPosition) {
case "bottomLeft":
x = 0;
y = 3;
break;
case "bottomRight":
x = pdfWidth - textW;
y = 3;
break;
case "bottomCenter":
x = (pdfWidth - textW) / 2;
y = 3;
break;
case "center":
x = (pdfWidth - textW) / 2;
y = (pdfHeight - textH) / 2;
break;
case "centerLeft":
x = 0;
y = (pdfHeight - textH) / 2;
break;
case "centerRight":
x = pdfWidth - textW;
y = (pdfHeight - textH) / 2;
break;
case "topLeft":
x = 0;
y = pdfHeight - textH;
break;
case "topCenter":
x = (pdfWidth - textW) / 2;
y = pdfHeight - textH;
break;
case "topRight":
x = pdfWidth - textW;
y = pdfHeight - textH;
break;
default:
x = pdfWidth - textW;
y = 3;
break;
}
}
under.showTextAligned(0, waterMarkName, x, y, degree.intValue());
under.endText();
}
stamper.close();
reader.close();
System.out.println("**********PDF完成添加文字水印工作**********");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void pressImageWater(String srcPath, String targetPath, String imgPath, int x, int y) {
PdfReader reader = null;
PdfStamper stamp = null;
try {
reader = new PdfReader(srcPath);
File targetFile = new File(targetPath);
if (!targetFile.getParentFile().exists()) {
targetFile.getParentFile().mkdirs();
}
stamp = new PdfStamper(reader, new FileOutputStream(targetFile));
Image img = Image.getInstance(imgPath);
for (int i = 1; i <= reader.getNumberOfPages(); i++) {
PdfContentByte over = stamp.getOverContent(i);
img.setAbsolutePosition(x, y);
over.addImage(img);
}
stamp.close();
reader.close();
System.out.println("**********PDF完成添加图片水印工作**********");
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
public static void pressImageWater(String srcPath, String targetPath, String imgPath, int x, int y, int r) {
PdfReader reader = null;
PdfStamper stamp = null;
try {
reader = new PdfReader(srcPath);
File targetFile = new File(targetPath);
if (!targetFile.getParentFile().exists()) {
targetFile.getParentFile().mkdirs();
}
stamp = new PdfStamper(reader, new FileOutputStream(targetFile));
Image img = Image.getInstance(imgPath);
for (int i = 1; i <= reader.getNumberOfPages(); i++) {
PdfContentByte over = stamp.getOverContent(i);
img.setAbsolutePosition(x, y);
img.setRotationDegrees(r);
over.addImage(img);
}
stamp.close();
reader.close();
System.out.println("**********PDF完成添加图片水印工作**********");
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
public static void pressImageWater(String srcPath, String targetPath, String imgPath, String position, Integer left, Integer top) {
PdfReader reader = null;
PdfStamper stamp = null;
try {
reader = new PdfReader(srcPath);
File targetFile = new File(targetPath);
if (!targetFile.getParentFile().exists()) {
targetFile.getParentFile().mkdirs();
}
stamp = new PdfStamper(reader, new FileOutputStream(targetFile));
Image img = Image.getInstance(imgPath);
for (int i = 1; i <= reader.getNumberOfPages(); i++) {
PdfContentByte over = stamp.getOverContent(i);
Rectangle pageSize = reader.getPageSize(i);
int srcWth = (int)pageSize.getWidth();
int srcHht = (int)pageSize.getHeight();
int imgWth = (int)img.getWidth();
int imgHht = (int)img.getHeight();
int x = left.intValue();
int y = top.intValue();
if (x == 0 && y == 0) {
switch (position) {
case "topLeft":
x = 0;
y = srcHht - imgHht;
break;
case "topCenter":
x = (srcWth - imgWth) / 2;
y = srcHht - imgHht;
break;
case "topRight":
x = srcWth - imgWth;
y = srcHht - imgHht;
break;
case "center":
x = (srcWth - imgWth) / 2;
y = (srcHht - imgHht) / 2;
break;
case "centerLeft":
x = 0;
y = (srcHht - imgHht) / 2;
break;
case "centerRight":
x = srcWth - imgWth;
y = (srcHht - imgHht) / 2;
break;
case "bottomLeft":
x = 0;
y = 0;
break;
case "bottomRight":
x = srcWth - imgWth;
y = 0;
break;
case "bottomCenter":
x = (srcWth - imgWth) / 2;
y = 0;
break;
default:
x = srcWth - imgWth;
y = 0;
break;
}
}
img.setAbsolutePosition(x, y);
over.addImage(img);
}
stamp.close();
reader.close();
System.out.println("**********PDF完成添加文字水印工作**********");
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
public static void main(String[] args) {
String iconPath = "C:\\Users\\18291\\Desktop\\watermark\\watermark2.png";
String srcPdfPath = "C:\\Users\\18291\\Desktop\\watermark\\0101-2001-长期-办公室-0005.pdf";
String outPdfPath = "C:\\Users\\18291\\Desktop\\watermark\\1\\2\\w3.pdf";
String contont = "Font类是用于设置图形用户界面上的字体样式";
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\PdfWaterMarkUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,192 @@
package com.archive.common.archiveUtil;
import com.archive.common.archiveUtil.TableUtil;
import com.archive.project.common.service.IExecuteSqlService;
import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn;
import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService;
import java.util.List;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SqlLiteUtil
{
@Autowired
private IExecuteSqlService executeSqlService;
@Autowired
private IPhysicalTableColumnService physicalTableColumnService;
private static IExecuteSqlService UtilExecuteSqlService;
private static IPhysicalTableColumnService UtilPhysicalTableColumnService;
@PostConstruct
private void initialize() {
UtilExecuteSqlService = this.executeSqlService;
UtilPhysicalTableColumnService = this.physicalTableColumnService;
}
public static boolean updateColumnType(String tableName, String columnType, String columnName, String mrz) throws Exception {
boolean res = true;
String newTableName = tableName + "_resect";
String createSql = "CREATE TABLE " + newTableName + " ( id INTEGER PRIMARY KEY AUTOINCREMENT,";
String tableId = TableUtil.getTableId(tableName);
PhysicalTableColumn ptc = new PhysicalTableColumn();
ptc.setTableId(Long.valueOf(Long.parseLong(tableId)));
List<PhysicalTableColumn> ptcList = UtilPhysicalTableColumnService.selectPhysicalTableColumnList(ptc);
String columns = "id,";
for (int i = 0; i < ptcList.size(); i++) {
String type = "TEXT";
if (i == ptcList.size() - 1) {
columns = columns + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode();
} else {
columns = columns + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + ",";
}
if (((PhysicalTableColumn)ptcList.get(i)).getColumnType().equals("C"))
{
type = "INTEGER";
}
if (((PhysicalTableColumn)ptcList.get(i)).getColumnCode().equals(columnName)) {
if (i == ptcList.size() - 1) {
if (mrz != null && !mrz.trim().equals("")) {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + columnType + " DEFAULT " + mrz;
} else {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + columnType;
}
} else if (mrz != null && !mrz.trim().equals("")) {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + columnType + " DEFAULT " + mrz + " ,";
} else {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + columnType + ",";
}
} else {
String otherColumnMrz = ((PhysicalTableColumn)ptcList.get(i)).getMrz();
if (i == ptcList.size() - 1) {
if (otherColumnMrz != null && !otherColumnMrz.trim().equals("")) {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + " DEFAULT " + otherColumnMrz;
} else {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type;
}
} else if (otherColumnMrz != null && !otherColumnMrz.trim().equals("")) {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + " DEFAULT " + otherColumnMrz + ",";
} else {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + ",";
}
}
}
createSql = createSql + ") ";
UtilExecuteSqlService.jdbcTemplateExecute(createSql);
String sql = "insert into " + newTableName + " select " + columns + " from " + tableName + "";
UtilExecuteSqlService.jdbcTemplateExecute(sql);
String dropSql = "DROP TABLE " + tableName;
UtilExecuteSqlService.jdbcTemplateExecute(dropSql);
String updateTableNameSql = "ALTER TABLE " + newTableName + " RENAME TO " + tableName + "";
UtilExecuteSqlService.jdbcTemplateExecute(updateTableNameSql);
return res;
}
public static boolean deleteColumn(String tableName, String columnName) throws Exception {
boolean res = true;
String newTableName = tableName + "_resect";
String createSql = "CREATE TABLE " + newTableName + " ( id INTEGER PRIMARY KEY AUTOINCREMENT,";
String tableId = TableUtil.getTableId(tableName);
PhysicalTableColumn ptc = new PhysicalTableColumn();
ptc.setTableId(Long.valueOf(Long.parseLong(tableId)));
List<PhysicalTableColumn> ptcList = UtilPhysicalTableColumnService.selectPhysicalTableColumnList(ptc);
String columns = "id,";
for (int i = 0; i < ptcList.size(); i++) {
String type = "TEXT";
if (((PhysicalTableColumn)ptcList.get(i)).getColumnType().equals("C"))
{
type = "INTEGER";
}
if (((PhysicalTableColumn)ptcList.get(i)).getColumnCode().equals(columnName)) {
System.out.println("此字段删除:" + columnName);
} else {
String otherColumnMrz = ((PhysicalTableColumn)ptcList.get(i)).getMrz();
if (i == ptcList.size() - 1) {
if (otherColumnMrz != null && !otherColumnMrz.trim().equals("")) {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + " DEFAULT " + otherColumnMrz;
} else {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type;
}
columns = columns + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode();
} else {
if (otherColumnMrz != null && !otherColumnMrz.trim().equals("")) {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + " DEFAULT " + otherColumnMrz + ",";
} else {
createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + ",";
}
columns = columns + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + ",";
}
}
}
if (createSql.substring(createSql.length() - 1).equals(",")) {
createSql = createSql.substring(0, createSql.length() - 1);
}
createSql = createSql + ") ";
UtilExecuteSqlService.jdbcTemplateExecute(createSql);
if (columns.substring(columns.length() - 1).equals(",")) {
columns = columns.substring(0, columns.length() - 1);
}
String sql = "insert into " + newTableName + " select " + columns + " from " + tableName + "";
UtilExecuteSqlService.jdbcTemplateExecute(sql);
String dropSql = "DROP TABLE " + tableName;
UtilExecuteSqlService.jdbcTemplateExecute(dropSql);
String updateTableNameSql = "ALTER TABLE " + newTableName + " RENAME TO " + tableName + "";
UtilExecuteSqlService.jdbcTemplateExecute(updateTableNameSql);
return res;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\SqlLiteUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,139 @@
package com.archive.common.archiveUtil;
import com.archive.project.dasz.archivetype.domain.ArchiveType;
import com.archive.project.dasz.archivetype.service.IArchiveTypeService;
import com.archive.project.dasz.physicaltable.domain.PhysicalTable;
import com.archive.project.dasz.physicaltable.service.IPhysicalTableService;
import java.util.List;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class TableUtil
{
@Autowired
private IPhysicalTableService service;
private static IPhysicalTableService physicalTableService;
@Autowired
private IArchiveTypeService archiveTypeservice;
private static IArchiveTypeService archiveTypeService1;
@PostConstruct
public void init() {
physicalTableService = this.service;
archiveTypeService1 = this.archiveTypeservice;
}
public static String getTableId(String tableName) {
PhysicalTable physicalTable = new PhysicalTable();
physicalTable.setTablename(tableName.toLowerCase());
List<PhysicalTable> list = physicalTableService.selectPhysicalTableList(physicalTable);
if (list != null && list.size() > 0) {
return String.valueOf(((PhysicalTable)list.get(0)).getId());
}
return "";
}
public static String getTableName(Long tableId) {
PhysicalTable physicalTable = physicalTableService.selectPhysicalTableById(tableId);
if (physicalTable != null) {
return physicalTable.getTablename();
}
return "";
}
public static long getTableIdByArchiveTypeId(long archiveTypeId) {
long tableId = 0L;
ArchiveType ArchiveType = archiveTypeService1.selectArchiveTypeById(Long.valueOf(archiveTypeId));
String archiveCode = ArchiveType.getArhciveCode();
String archiveType = ArchiveType.getType();
String tableName = "";
if (archiveType.toLowerCase().equals("file")) {
tableName = "t_ar_" + archiveCode + "_file";
} else if (archiveType.toLowerCase().equals("folder")) {
tableName = "t_ar_" + archiveCode + "_folder";
}
if (!tableName.equals("")) {
PhysicalTable pt = new PhysicalTable();
pt.setTablename(tableName.toLowerCase());
List<PhysicalTable> pts = physicalTableService.selectPhysicalTableList(pt);
if (pts.size() > 0 && pts.get(0) != null) {
tableId = ((PhysicalTable)pts.get(0)).getId().longValue();
}
}
return tableId;
}
public static long getArchiveTypeIdByTableId(long tableId) {
long ArchiveTypeId = 0L;
String tableName = getTableName(Long.valueOf(tableId));
String archiveCode = tableName.substring(5, tableName.lastIndexOf("_"));
ArchiveType ac = new ArchiveType();
ac.setArhciveCode(archiveCode.toUpperCase());
List<ArchiveType> list = archiveTypeService1.selectArchiveTypeList(ac);
if (list != null && list.get(0) != null) {
ArchiveTypeId = ((ArchiveType)list.get(0)).getId().longValue();
}
return ArchiveTypeId;
}
public static List<ArchiveType> getAllArchiveType() {
ArchiveType ac = new ArchiveType();
List<ArchiveType> list = archiveTypeService1.selectArchiveTypeList(ac);
return list;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\TableUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,124 @@
package com.archive.common.archiveUtil;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
public class ZipUtil
{
public static void unZip(File srcFile, String destDirPath) throws RuntimeException {
long start = System.currentTimeMillis();
if (!srcFile.exists()) {
throw new RuntimeException(srcFile.getPath() + "所指文件不存在");
}
ZipFile zipFile = null;
try {
zipFile = new ZipFile(srcFile, Charset.forName("GBK"));
Enumeration<?> entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry entry = (ZipEntry)entries.nextElement();
System.out.println("解压" + entry.getName());
if (entry.isDirectory()) {
String dirPath = destDirPath + "/" + entry.getName();
File dir = new File(dirPath);
dir.mkdirs();
continue;
}
File targetFile = new File(destDirPath + "/" + entry.getName());
if (!targetFile.getParentFile().exists()) {
targetFile.getParentFile().mkdirs();
}
targetFile.createNewFile();
InputStream is = zipFile.getInputStream(entry);
FileOutputStream fos = new FileOutputStream(targetFile);
byte[] buf = new byte[4096];
int len;
while ((len = is.read(buf)) != -1) {
fos.write(buf, 0, len);
}
fos.close();
is.close();
}
long end = System.currentTimeMillis();
System.out.println("解压完成,耗时:" + (end - start) + " ms");
}
catch (Exception e) {
throw new RuntimeException("unzip error from ZipUtils", e);
} finally {
if (zipFile != null)
try {
zipFile.close();
}
catch (IOException e) {
e.printStackTrace();
}
}
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\ZipUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,55 @@
package com.archive.common.constant;
import java.util.HashMap;
import java.util.Map;
public class CommonMap
{
public static Map<String, String> javaTypeMap = new HashMap<>();
static {
initJavaTypeMap();
}
public static void initJavaTypeMap() {
javaTypeMap.put("tinyint", "Integer");
javaTypeMap.put("smallint", "Integer");
javaTypeMap.put("mediumint", "Integer");
javaTypeMap.put("int", "Integer");
javaTypeMap.put("number", "Integer");
javaTypeMap.put("integer", "integer");
javaTypeMap.put("bigint", "Long");
javaTypeMap.put("float", "Float");
javaTypeMap.put("double", "Double");
javaTypeMap.put("decimal", "BigDecimal");
javaTypeMap.put("bit", "Boolean");
javaTypeMap.put("char", "String");
javaTypeMap.put("varchar", "String");
javaTypeMap.put("varchar2", "String");
javaTypeMap.put("tinytext", "String");
javaTypeMap.put("text", "String");
javaTypeMap.put("mediumtext", "String");
javaTypeMap.put("longtext", "String");
javaTypeMap.put("time", "Date");
javaTypeMap.put("date", "Date");
javaTypeMap.put("datetime", "Date");
javaTypeMap.put("timestamp", "Date");
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\CommonMap.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,49 @@
package com.archive.common.constant;
public class Constants {
public static final String UTF8 = "UTF-8";
public static final String GBK = "GBK";
public static final String SUCCESS = "0";
public static final String FAIL = "1";
public static final String LOGIN_SUCCESS = "Success";
public static final String LOGOUT = "Logout";
public static final String REGISTER = "Register";
public static final String LOGIN_FAIL = "Error";
public static final String PAGE_NUM = "pageNum";
public static final String PAGE_SIZE = "pageSize";
public static final String ORDER_BY_COLUMN = "orderByColumn";
public static final String IS_ASC = "isAsc";
public static final String SYS_AUTH_CACHE = "sys-authCache";
public static final String SYS_CONFIG_CACHE = "sys-config";
public static final String SYS_CONFIG_KEY = "sys_config:";
public static final String SYS_DICT_CACHE = "sys-dict";
public static final String SYS_DICT_KEY = "sys_dict:";
public static final String RESOURCE_PREFIX = "/profile";
public static final String DATABASE_TYPE_MYSQL = "mysql";
public static final String DATABASE_TYPE_SQLITE = "sqlite";
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\Constants.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,85 @@
/* */ package com.archive.common.constant;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class GenConstants
/* */ {
/* */ public static final String TPL_CRUD = "crud";
/* */ public static final String TPL_TREE = "tree";
/* */ public static final String TPL_SUB = "sub";
/* */ public static final String TREE_CODE = "treeCode";
/* */ public static final String TREE_PARENT_CODE = "treeParentCode";
/* */ public static final String TREE_NAME = "treeName";
/* */ public static final String PARENT_MENU_ID = "parentMenuId";
/* */ public static final String PARENT_MENU_NAME = "parentMenuName";
/* 35 */ public static final String[] COLUMNTYPE_STR = new String[] { "char", "varchar", "nvarchar", "varchar2" };
/* */
/* */
/* 38 */ public static final String[] COLUMNTYPE_TEXT = new String[] { "tinytext", "text", "mediumtext", "longtext" };
/* */
/* */
/* 41 */ public static final String[] COLUMNTYPE_TIME = new String[] { "datetime", "time", "date", "timestamp" };
/* */
/* */
/* 44 */ public static final String[] COLUMNTYPE_NUMBER = new String[] { "tinyint", "smallint", "mediumint", "int", "number", "integer", "bit", "bigint", "float", "double", "decimal" };
/* */
/* */
/* */
/* 48 */ public static final String[] COLUMNNAME_NOT_EDIT = new String[] { "id", "create_by", "create_time", "del_flag" };
/* */
/* */
/* 51 */ public static final String[] COLUMNNAME_NOT_LIST = new String[] { "id", "create_by", "create_time", "del_flag", "update_by", "update_time" };
/* */
/* */
/* */
/* 55 */ public static final String[] COLUMNNAME_NOT_QUERY = new String[] { "id", "create_by", "create_time", "del_flag", "update_by", "update_time", "remark" };
/* */
/* */
/* */
/* 59 */ public static final String[] BASE_ENTITY = new String[] { "createBy", "createTime", "updateBy", "updateTime", "remark" };
/* */
/* */
/* 62 */ public static final String[] TREE_ENTITY = new String[] { "parentName", "parentId", "orderNum", "ancestors" };
/* */ public static final String HTML_INPUT = "input";
/* */ public static final String HTML_TEXTAREA = "textarea";
/* */ public static final String HTML_SELECT = "select";
/* */ public static final String HTML_RADIO = "radio";
/* */ public static final String HTML_CHECKBOX = "checkbox";
/* */ public static final String HTML_DATETIME = "datetime";
/* */ public static final String HTML_UPLOAD = "upload";
/* */ public static final String HTML_SUMMERNOTE = "summernote";
/* */ public static final String TYPE_STRING = "String";
/* */ public static final String TYPE_INTEGER = "Integer";
/* */ public static final String TYPE_LONG = "Long";
/* */ public static final String TYPE_DOUBLE = "Double";
/* */ public static final String TYPE_BIGDECIMAL = "BigDecimal";
/* */ public static final String TYPE_DATE = "Date";
/* */ public static final String QUERY_LIKE = "LIKE";
/* */ public static final String REQUIRE = "1";
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\GenConstants.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,21 @@
package com.archive.common.constant;
public class PermissionConstants {
public static final String ADD_PERMISSION = "add";
public static final String EDIT_PERMISSION = "edit";
public static final String REMOVE_PERMISSION = "remove";
public static final String EXPORT_PERMISSION = "export";
public static final String VIEW_PERMISSION = "view";
public static final String LIST_PERMISSION = "list";
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\PermissionConstants.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,21 @@
package com.archive.common.constant;
public class ScheduleConstants {
public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
public static final String TASK_PROPERTIES = "TASK_PROPERTIES";
public static final String MISFIRE_DEFAULT = "0";
public static final String MISFIRE_IGNORE_MISFIRES = "1";
public static final String MISFIRE_FIRE_AND_PROCEED = "2";
public static final String MISFIRE_DO_NOTHING = "3";
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\ScheduleConstants.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,37 @@
package com.archive.common.constant;
public class ShiroConstants {
public static final String CURRENT_USER = "currentUser";
public static final String CURRENT_USERNAME = "username";
public static final String LOCK_SCREEN = "lockscreen";
public static final String MESSAGE = "message";
public static final String ERROR = "errorMsg";
public static final String ENCODING = "UTF-8";
public static final String ONLINE_SESSION = "online_session";
public static final String CURRENT_CAPTCHA = "captcha";
public static final String CURRENT_ENABLED = "captchaEnabled";
public static final String CURRENT_TYPE = "captchaType";
public static final String CURRENT_VALIDATECODE = "validateCode";
public static final String CAPTCHA_ERROR = "captchaError";
public static final String LOGINRECORDCACHE = "loginRecordCache";
public static final String SYS_USERCACHE = "sys-userCache";
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\ShiroConstants.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,55 @@
package com.archive.common.constant;
import com.archive.common.constant.ScheduleConstants;
public enum Status
{
NORMAL("0"),
PAUSE("1");
private String value;
Status(String value) {
this.value = value;
}
public String getValue() {
return this.value;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\ScheduleConstants$Status.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,85 @@
package com.archive.common.constant;
public class UserConstants {
public static final String NORMAL = "0";
public static final String EXCEPTION = "1";
public static final String USER_DISABLE = "1";
public static final String ROLE_DISABLE = "1";
public static final String DEPT_NORMAL = "0";
public static final String DEPT_DISABLE = "1";
public static final String DICT_NORMAL = "0";
public static final String YES = "Y";
public static final int USERNAME_MIN_LENGTH = 2;
public static final int USERNAME_MAX_LENGTH = 20;
public static final String USER_NAME_UNIQUE = "0";
public static final String USER_NAME_NOT_UNIQUE = "1";
public static final String USER_PHONE_UNIQUE = "0";
public static final String USER_PHONE_NOT_UNIQUE = "1";
public static final String USER_EMAIL_UNIQUE = "0";
public static final String USER_EMAIL_NOT_UNIQUE = "1";
public static final String DEPT_NAME_UNIQUE = "0";
public static final String DEPT_NAME_NOT_UNIQUE = "1";
public static final String ROLE_NAME_UNIQUE = "0";
public static final String ROLE_NAME_NOT_UNIQUE = "1";
public static final String POST_NAME_UNIQUE = "0";
public static final String POST_NAME_NOT_UNIQUE = "1";
public static final String ROLE_KEY_UNIQUE = "0";
public static final String ROLE_KEY_NOT_UNIQUE = "1";
public static final String POST_CODE_UNIQUE = "0";
public static final String POST_CODE_NOT_UNIQUE = "1";
public static final String MENU_NAME_UNIQUE = "0";
public static final String MENU_NAME_NOT_UNIQUE = "1";
public static final String DICT_TYPE_UNIQUE = "0";
public static final String DICT_TYPE_NOT_UNIQUE = "1";
public static final String CONFIG_KEY_UNIQUE = "0";
public static final String CONFIG_KEY_NOT_UNIQUE = "1";
public static final int PASSWORD_MIN_LENGTH = 5;
public static final int PASSWORD_MAX_LENGTH = 20;
public static final String SYSTEM_USER_TYPE = "00";
public static final String REGISTER_USER_TYPE = "01";
public static final String MOBILE_PHONE_NUMBER_PATTERN = "^0{0,1}(13[0-9]|15[0-9]|14[0-9]|18[0-9])[0-9]{8}$";
public static final String EMAIL_PATTERN = "^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?";
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\UserConstants.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,149 @@
/* */ package com.archive.common.convert;
/* */
/* */ import com.aspose.cells.IndividualFontConfigs;
/* */ import com.aspose.cells.License;
/* */ import com.aspose.cells.LoadOptions;
/* */ import com.aspose.cells.PdfSaveOptions;
/* */ import com.aspose.cells.SaveOptions;
/* */ import com.aspose.cells.Workbook;
/* */ import java.io.ByteArrayInputStream;
/* */ import java.io.FileOutputStream;
/* */ import java.io.InputStream;
/* */
/* */
/* */
/* */
/* */
/* */ public class ExcelToPdf
/* */ {
/* */ public static void main(String[] args) {
/* 20 */ excel2pdf("D:\\temp\\1.xls", "D:\\temp\\31.pdf");
/* */ }
/* */
/* */
/* */
/* */
/* */ public static boolean getLicense() {
/* 27 */ boolean result = false;
/* */ try {
/* 29 */ String license = "<License>\r\n <Data>\r\n <Products>\r\n <Product>Aspose.Total for Java</Product>\r\n <Product>Aspose.Words for Java</Product>\r\n </Products>\r\n <EditionType>Enterprise</EditionType>\r\n <SubscriptionExpiry>20991231</SubscriptionExpiry>\r\n <LicenseExpiry>20991231</LicenseExpiry>\r\n <SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>\r\n </Data>\r\n <Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>\r\n</License>";
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* 43 */ InputStream is = new ByteArrayInputStream(license.getBytes("UTF-8"));
/* 44 */ License aposeLic = new License();
/* 45 */ aposeLic.setLicense(is);
/* 46 */ result = true;
/* 47 */ } catch (Exception e) {
/* 48 */ e.printStackTrace();
/* */ }
/* 50 */ return result;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void excel2pdf(String sourceFilePath, String desFilePathd) {
/* 60 */ if (!getLicense()) {
/* */ return;
/* */ }
/* */ try {
/* 64 */ if (isLinux()) {
/* 65 */ IndividualFontConfigs configs = new IndividualFontConfigs();
/* 66 */ configs.setFontFolder("/usr/share/fonts/chinese", true);
/* 67 */ LoadOptions loadOptions = new LoadOptions();
/* 68 */ loadOptions.setFontConfigs(configs);
/* */ }
/* */
/* */
/* */
/* 73 */ Workbook wb = new Workbook(sourceFilePath);
/* */
/* 75 */ FileOutputStream fileOS = new FileOutputStream(desFilePathd);
/* 76 */ PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
/* 77 */ pdfSaveOptions.setOnePagePerSheet(true);
/* 78 */ int[] autoDrawSheets = { 3 };
/* */
/* 80 */ autoDraw(wb, autoDrawSheets);
/* 81 */ int[] showSheets = { 0 };
/* */
/* 83 */ printSheetPage(wb, showSheets);
/* 84 */ wb.save(fileOS, (SaveOptions)pdfSaveOptions);
/* 85 */ fileOS.flush();
/* 86 */ fileOS.close();
/* */ }
/* 88 */ catch (Exception e) {
/* 89 */ e.printStackTrace();
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void autoDraw(Workbook wb, int[] page) {
/* 99 */ if (null != page && page.length > 0) {
/* 100 */ for (int i = 0; i < page.length; i++) {
/* 101 */ wb.getWorksheets().get(i).getHorizontalPageBreaks().clear();
/* 102 */ wb.getWorksheets().get(i).getVerticalPageBreaks().clear();
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void printSheetPage(Workbook wb, int[] page) {
/* */ int i;
/* 114 */ for (i = 1; i < wb.getWorksheets().getCount(); i++) {
/* 115 */ wb.getWorksheets().get(i).setVisible(false);
/* */ }
/* 117 */ if (null == page || page.length == 0) {
/* 118 */ wb.getWorksheets().get(0).setVisible(true);
/* */ } else {
/* 120 */ for (i = 0; i < page.length; i++) {
/* 121 */ wb.getWorksheets().get(i).setVisible(true);
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */ public static boolean isLinux() {
/* 128 */ return System.getProperty("os.name").toLowerCase().contains("linux");
/* */ }
/* */
/* */ public static boolean isWindows() {
/* 132 */ return System.getProperty("os.name").toLowerCase().contains("windows");
/* */ }
/* */
/* */ public String JudgeSystem() {
/* 136 */ if (isLinux())
/* 137 */ return "linux";
/* 138 */ if (isWindows()) {
/* 139 */ return "windows";
/* */ }
/* 141 */ return "other system";
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\convert\ExcelToPdf.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,56 @@
/* */ package com.archive.common.convert;
/* */
/* */ import java.io.File;
/* */ import java.io.FileOutputStream;
/* */ import java.io.OutputStream;
/* */ import org.xhtmlrenderer.pdf.ITextFontResolver;
/* */ import org.xhtmlrenderer.pdf.ITextRenderer;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class HtmlToPdf
/* */ {
/* */ public static void html2pdf(String htmlFile, String pdfFile) throws Exception {
/* 21 */ String url = (new File(htmlFile)).toURI().toURL().toString();
/* 22 */ System.out.println(url);
/* */
/* 24 */ OutputStream os = new FileOutputStream(pdfFile);
/* 25 */ ITextRenderer renderer = new ITextRenderer();
/* 26 */ renderer.setDocument(url);
/* */
/* */
/* 29 */ ITextFontResolver fontResolver = renderer.getFontResolver();
/* 30 */ if ("linux".equals(getCurrentOperatingSystem())) {
/* 31 */ fontResolver.addFont("/usr/share/fonts/chiness/simsun.ttc", "Identity-H", true);
/* */ } else {
/* 33 */ fontResolver.addFont("c:/Windows/Fonts/simsun.ttc", "Identity-H", false);
/* */ }
/* */
/* 36 */ renderer.layout();
/* 37 */ renderer.createPDF(os);
/* 38 */ os.close();
/* */
/* 40 */ System.out.println("create pdf done!!");
/* */ }
/* */
/* */
/* */ public static String getCurrentOperatingSystem() {
/* 45 */ String os = System.getProperty("os.name").toLowerCase();
/* 46 */ System.out.println("---------当前操作系统是-----------" + os);
/* 47 */ return os;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\convert\HtmlToPdf.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,396 @@
/* */ package com.archive.common.convert;
/* */
/* */ import com.lowagie.text.Document;
/* */ import com.lowagie.text.Element;
/* */ import com.lowagie.text.Image;
/* */ import com.lowagie.text.Rectangle;
/* */ import com.lowagie.text.pdf.PdfWriter;
/* */ import java.awt.AlphaComposite;
/* */ import java.awt.Color;
/* */ import java.awt.Font;
/* */ import java.awt.Graphics;
/* */ import java.awt.Graphics2D;
/* */ import java.awt.Image;
/* */ import java.awt.RenderingHints;
/* */ import java.awt.image.BufferedImage;
/* */ import java.io.File;
/* */ import java.io.FileOutputStream;
/* */ import java.io.IOException;
/* */ import java.text.DecimalFormat;
/* */ import java.util.ArrayList;
/* */ import java.util.Arrays;
/* */ import javax.imageio.ImageIO;
/* */ import javax.swing.ImageIcon;
/* */
/* */ public class ImgConvert
/* */ {
/* */ public static void ImagesToPdf(String imageFolderPath, String pdfPath) {
/* */ try {
/* 29 */ long start = System.currentTimeMillis();
/* 30 */ ArrayList<String> list = new ArrayList<>();
/* */
/* 32 */ String imagePath = null;
/* 33 */ FileOutputStream fos = new FileOutputStream(pdfPath);
/* */
/* 35 */ Document doc = new Document(null, 20.0F, 20.0F, 20.0F, 20.0F);
/* */
/* 37 */ PdfWriter.getInstance(doc, fos);
/* */
/* */
/* */
/* */
/* */
/* 43 */ File file = new File(imageFolderPath);
/* 44 */ File[] files = file.listFiles();
/* */
/* 46 */ for (File file1 : files) {
/* 47 */ if (file1.getName().endsWith(".png") || file1.getName().endsWith(".jpg") || file1.getName().endsWith(".gif") || file1
/* 48 */ .getName().endsWith(".jpeg") || file1.getName().endsWith(".tif")) {
/* 49 */ imagePath = imageFolderPath + File.separator + file1.getName();
/* 50 */ list.add(file1.getName());
/* */
/* 52 */ BufferedImage img = ImageIO.read(new File(imagePath));
/* */
/* 54 */ doc.setPageSize(new Rectangle(img.getWidth(), img.getHeight()));
/* */
/* 56 */ Image image = Image.getInstance(imagePath);
/* */
/* 58 */ doc.open();
/* 59 */ doc.add((Element)image);
/* */ }
/* */ }
/* */
/* */
/* 64 */ doc.close();
/* 65 */ long endTime = System.currentTimeMillis();
/* 66 */ int time = (int)((endTime - start) / 1000L);
/* 67 */ System.out.println("用时:{" + time + "}:秒!");
/* 68 */ } catch (Exception e) {
/* 69 */ e.printStackTrace();
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void ImgToPdf(String imagePath, String pdfPath) {
/* */ try {
/* 81 */ long start = System.currentTimeMillis();
/* 82 */ ArrayList<String> list = new ArrayList<>();
/* */
/* */
/* 85 */ FileOutputStream fos = new FileOutputStream(pdfPath);
/* */
/* 87 */ Document doc = new Document(null, 20.0F, 20.0F, 20.0F, 20.0F);
/* */
/* 89 */ PdfWriter.getInstance(doc, fos);
/* */
/* */
/* */
/* */
/* */
/* 95 */ BufferedImage img = ImageIO.read(new File(imagePath));
/* */
/* 97 */ doc.setPageSize(new Rectangle(img.getWidth(), img.getHeight()));
/* */
/* 99 */ Image image = Image.getInstance(imagePath);
/* */
/* 101 */ doc.open();
/* 102 */ doc.add((Element)image);
/* */
/* */
/* */
/* 106 */ doc.close();
/* 107 */ long endTime = System.currentTimeMillis();
/* 108 */ int time = (int)((endTime - start) / 1000L);
/* 109 */ System.out.println("用时:{" + time + "}:秒!");
/* 110 */ } catch (Exception e) {
/* 111 */ e.printStackTrace();
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void PngToJpg(String pngPath, String jpgPath) {
/* */ try {
/* 125 */ BufferedImage bufferedImage = ImageIO.read(new File(pngPath));
/* 126 */ BufferedImage newBufferedImage = new BufferedImage(bufferedImage.getWidth(), bufferedImage.getHeight(), 1);
/* 127 */ newBufferedImage.createGraphics().drawImage(bufferedImage, 0, 0, Color.white, null);
/* 128 */ ImageIO.write(newBufferedImage, "jpg", new File(jpgPath));
/* 129 */ } catch (Exception e) {
/* 130 */ System.out.println("ERROR:png转jpg出现异常:" + e.getMessage());
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void JpgToPng(String jpgPath, String pngPath) {
/* */ try {
/* 144 */ BufferedImage bufferedImage = ImageIO.read(new File(jpgPath));
/* 145 */ BufferedImage newBufferedImage = new BufferedImage(bufferedImage.getWidth(), bufferedImage.getHeight(), 1);
/* 146 */ newBufferedImage.createGraphics().drawImage(bufferedImage, 0, 0, Color.white, null);
/* 147 */ ImageIO.write(newBufferedImage, "png", new File(pngPath));
/* 148 */ } catch (Exception e) {
/* 149 */ System.out.println("ERROR:jpg转png出现异常:" + e.getMessage());
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static BufferedImage waterMarkByText(int width, int heigth, String text, Color color, Font font, Double degree, float alpha) {
/* 167 */ BufferedImage buffImg = new BufferedImage(width, heigth, 1);
/* */
/* 169 */ Graphics2D g2d = buffImg.createGraphics();
/* */
/* */
/* 172 */ buffImg = g2d.getDeviceConfiguration().createCompatibleImage(width, heigth, 3);
/* 173 */ g2d.dispose();
/* 174 */ g2d = buffImg.createGraphics();
/* */
/* */
/* */
/* 178 */ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* 186 */ if (null != degree)
/* */ {
/* */
/* 189 */ g2d.rotate(Math.toRadians(degree.doubleValue()), buffImg.getWidth() / 2.0D, buffImg
/* 190 */ .getHeight() / 2.0D);
/* */ }
/* */
/* */
/* 194 */ g2d.setColor(color);
/* */
/* */
/* 197 */ g2d.setFont(font);
/* */
/* */
/* 200 */ g2d.setComposite(AlphaComposite.getInstance(3, alpha));
/* */
/* 202 */ float realWidth = getRealFontWidth(text);
/* 203 */ float fontSize = font.getSize();
/* */
/* */
/* 206 */ float x = 0.5F * width - 0.5F * fontSize * realWidth;
/* 207 */ float y = 0.5F * heigth + 0.5F * fontSize;
/* */
/* 209 */ g2d.drawString(text, x, y);
/* */
/* 211 */ g2d.dispose();
/* */
/* 213 */ return buffImg;
/* */ }
/* */
/* */
/* */
/* */ public static BufferedImage waterMarkByText(int width, int heigth, String text, Color color, float alpha) {
/* 219 */ Font font = new Font("Dialog", 0, 33);
/* 220 */ return waterMarkByText(width, heigth, text, color, font, Double.valueOf(-30.0D), alpha);
/* */ }
/* */
/* */ public static BufferedImage waterMarkByText(int width, int heigth, String text, float alpha) {
/* 224 */ return waterMarkByText(width, heigth, text, Color.GRAY, alpha);
/* */ }
/* */
/* */
/* */ public static BufferedImage waterMarkByText(int width, int heigth, String text) {
/* 229 */ return waterMarkByText(width, heigth, text, 0.2F);
/* */ }
/* */
/* */ public static BufferedImage waterMarkByText(String text) {
/* 233 */ return waterMarkByText(200, 150, text);
/* */ }
/* */
/* */
/* */
/* */
/* */ private static float getRealFontWidth(String text) {
/* 240 */ int len = text.length();
/* 241 */ float width = 0.0F;
/* 242 */ for (int i = 0; i < len; i++) {
/* 243 */ if (text.charAt(i) < 'Ā') {
/* 244 */ width += 0.5F;
/* */ } else {
/* 246 */ width++;
/* */ }
/* */ }
/* 249 */ return width;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void changeImgColor(String path, String newPath) throws IOException {
/* 263 */ File file = new File(path);
/* 264 */ BufferedImage bi = ImageIO.read(file);
/* 265 */ Image image = bi;
/* */
/* 267 */ ImageIcon imageIcon = new ImageIcon(image);
/* 268 */ int width = imageIcon.getIconWidth();
/* 269 */ int height = imageIcon.getIconHeight();
/* */
/* 271 */ BufferedImage bufferedImage = new BufferedImage(width, height, 6);
/* 272 */ Graphics2D graphics2D = (Graphics2D)bufferedImage.getGraphics();
/* 273 */ graphics2D.drawImage(imageIcon.getImage(), 0, 0, imageIcon.getImageObserver());
/* 274 */ int alpha = 255;
/* */
/* 276 */ int RGB = bufferedImage.getRGB(width - 1, height - 1);
/* 277 */ for (int i = bufferedImage.getMinX(); i < width; i++) {
/* 278 */ for (int j = bufferedImage.getMinY(); j < height; j++) {
/* 279 */ int rgb = bufferedImage.getRGB(i, j);
/* 280 */ int r = (rgb & 0xFF0000) >> 16;
/* 281 */ int g = (rgb & 0xFF00) >> 8;
/* 282 */ int b = rgb & 0xFF;
/* 283 */ int R = (RGB & 0xFF0000) >> 16;
/* 284 */ int G = (RGB & 0xFF00) >> 8;
/* 285 */ int B = RGB & 0xFF;
/* */
/* 287 */ int a = 45;
/* 288 */ if (Math.abs(R - r) < a && Math.abs(G - g) < a && Math.abs(B - b) < a) {
/* 289 */ alpha = 0;
/* */ } else {
/* 291 */ alpha = 255;
/* */ }
/* 293 */ rgb = alpha << 24 | rgb & 0xFFFFFF;
/* 294 */ bufferedImage.setRGB(i, j, rgb);
/* */ }
/* */ }
/* 297 */ ImageIO.write(bufferedImage, "png", new File(newPath));
/* */ }
/* */
/* */ public static String convertRgbStr(int color) {
/* 301 */ int red = (color & 0xFF0000) >> 16;
/* 302 */ int green = (color & 0xFF00) >> 8;
/* 303 */ int blue = color & 0xFF;
/* 304 */ return red + "," + green + "," + blue;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String thumbnailImage(String imagePath, int w, int h, String prevfix, boolean force) {
/* 317 */ File imgFile = new File(imagePath);
/* 318 */ String newPath = "";
/* 319 */ if (imgFile.exists()) {
/* */
/* */ try {
/* 322 */ String types = Arrays.toString((Object[])ImageIO.getReaderFormatNames());
/* 323 */ String suffix = null;
/* */
/* 325 */ if (imgFile.getName().indexOf(".") > -1) {
/* 326 */ suffix = imgFile.getName().substring(imgFile.getName().lastIndexOf(".") + 1);
/* */ }
/* */
/* 329 */ if (suffix == null || types.toLowerCase().indexOf(suffix.toLowerCase()) < 0) {
/* 330 */ System.out.println("Sorry, the image suffix is illegal. the standard image suffix is {}." + types);
/* 331 */ return newPath;
/* */ }
/* 333 */ System.out.println("target image's size, width:{" + w + "}, height:{" + h + "}.");
/* 334 */ Image img = ImageIO.read(imgFile);
/* 335 */ if (!force) {
/* */
/* 337 */ int width = img.getWidth(null);
/* 338 */ int height = img.getHeight(null);
/* 339 */ if (width * 1.0D / w < height * 1.0D / h) {
/* 340 */ if (width > w) {
/* 341 */ h = Integer.parseInt((new DecimalFormat("0")).format((height * w) / width * 1.0D));
/* 342 */ System.out.println("change image's height, width:{" + w + "}, height:{" + h + "}.");
/* */ }
/* */
/* 345 */ } else if (height > h) {
/* 346 */ w = Integer.parseInt((new DecimalFormat("0")).format((width * h) / height * 1.0D));
/* 347 */ System.out.println("change image's width, width:{" + w + "}, height:{" + h + "}.");
/* */ }
/* */ }
/* */
/* 351 */ BufferedImage bi = new BufferedImage(w, h, 1);
/* 352 */ Graphics g = bi.getGraphics();
/* 353 */ g.drawImage(img, 0, 0, w, h, Color.LIGHT_GRAY, null);
/* 354 */ g.dispose();
/* 355 */ String p = imgFile.getPath();
/* */
/* 357 */ newPath = p.substring(0, p.lastIndexOf(File.separator)) + File.separator + prevfix + imgFile.getName();
/* 358 */ ImageIO.write(bi, suffix, new File(newPath));
/* 359 */ System.out.println("缩略图在原路径下生成成功");
/* 360 */ } catch (IOException e) {
/* 361 */ System.out.println("generate thumbnail image failed." + e);
/* */ }
/* */ } else {
/* 364 */ System.out.println("the image is not exist.");
/* */ }
/* 366 */ return newPath;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void main(String[] args) {
/* */ try {
/* 383 */ changeImgColor("F:\\FFOutput\\profile.png", "F:\\FFOutput\\profile1.png");
/* 384 */ } catch (IOException e) {
/* 385 */ e.printStackTrace();
/* */ }
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\convert\ImgConvert.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,207 @@
/* */ package com.archive.common.convert;
/* */
/* */ import java.io.BufferedReader;
/* */ import java.io.FileNotFoundException;
/* */ import java.io.IOException;
/* */ import java.io.InputStream;
/* */ import java.io.InputStreamReader;
/* */ import java.util.HashMap;
/* */ import java.util.HashSet;
/* */ import java.util.Iterator;
/* */ import java.util.Map;
/* */ import java.util.Properties;
/* */ import java.util.Set;
/* */ import net.sourceforge.pinyin4j.PinyinHelper;
/* */ import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
/* */ import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
/* */ import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
/* */ import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
/* */ import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
/* */
/* */
/* */
/* */
/* */
/* */ public class ZHConvert
/* */ {
/* 27 */ private Properties charMap = new Properties();
/* 28 */ private Set<String> conflictingSets = new HashSet<>();
/* */ public static final int TRADITIONAL = 0;
/* */ public static final int SIMPLIFIED = 1;
/* */ private static final int NUM_OF_CONVERTERS = 2;
/* 32 */ private static final com.archive.common.convert.ZHConvert[] converters = new com.archive.common.convert.ZHConvert[2];
/* 33 */ private static final String[] propertyFiles = new String[2];
/* */ static {
/* 35 */ propertyFiles[0] = "zh2Hant.properties";
/* 36 */ propertyFiles[1] = "zh2Hans.properties";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static com.archive.common.convert.ZHConvert getInstance(int converterType) {
/* 45 */ if (converterType >= 0 && converterType < 2) {
/* 46 */ if (converters[converterType] == null) {
/* 47 */ synchronized (com.archive.common.convert.ZHConvert.class) {
/* 48 */ if (converters[converterType] == null) {
/* 49 */ converters[converterType] = new com.archive.common.convert.ZHConvert(propertyFiles[converterType]);
/* */ }
/* */ }
/* */ }
/* 53 */ return converters[converterType];
/* */ }
/* 55 */ return null;
/* */ }
/* */
/* */
/* */ public static String convert(String text, int converterType) {
/* 60 */ com.archive.common.convert.ZHConvert instance = getInstance(converterType);
/* 61 */ return instance.convert(text);
/* */ }
/* */
/* */
/* */ private ZHConvert(String propertyFile) {
/* 66 */ InputStream is = null;
/* 67 */ is = getClass().getResourceAsStream(propertyFile);
/* */
/* 69 */ if (is != null) {
/* 70 */ BufferedReader reader = null;
/* */
/* 72 */ try { reader = new BufferedReader(new InputStreamReader(is));
/* 73 */ this.charMap.load(reader); }
/* 74 */ catch (FileNotFoundException fileNotFoundException)
/* */
/* */ {
/* */ try {
/* */
/* */
/* 80 */ if (reader != null)
/* 81 */ reader.close();
/* 82 */ if (is != null)
/* 83 */ is.close();
/* 84 */ } catch (IOException iOException) {} } catch (IOException e) { e.printStackTrace(); } finally { try { if (reader != null) reader.close(); if (is != null) is.close(); } catch (IOException iOException) {} }
/* */
/* */ }
/* */
/* 88 */ initializeHelper();
/* */ }
/* */
/* */
/* */ private void initializeHelper() {
/* 93 */ Map<String, Integer> stringPossibilities = new HashMap<>();
/* 94 */ Iterator<String> iter = this.charMap.keySet().iterator();
/* 95 */ while (iter.hasNext()) {
/* 96 */ String key = iter.next();
/* 97 */ if (key.length() >= 1) {
/* 98 */ for (int i = 0; i < key.length(); i++) {
/* 99 */ String keySubstring = key.substring(0, i + 1);
/* 100 */ if (stringPossibilities.containsKey(keySubstring)) {
/* 101 */ Integer integer = stringPossibilities.get(keySubstring);
/* 102 */ stringPossibilities.put(keySubstring, new Integer(integer
/* 103 */ .intValue() + 1));
/* */ } else {
/* 105 */ stringPossibilities.put(keySubstring, new Integer(1));
/* */ }
/* */ }
/* */ }
/* */ }
/* 110 */ iter = stringPossibilities.keySet().iterator();
/* 111 */ while (iter.hasNext()) {
/* 112 */ String key = iter.next();
/* 113 */ if (((Integer)stringPossibilities.get(key)).intValue() > 1) {
/* 114 */ this.conflictingSets.add(key);
/* */ }
/* */ }
/* */ }
/* */
/* */ public String convert(String in) {
/* 120 */ StringBuilder outString = new StringBuilder();
/* 121 */ StringBuilder stackString = new StringBuilder();
/* 122 */ for (int i = 0; i < in.length(); i++) {
/* 123 */ char c = in.charAt(i);
/* 124 */ String key = "" + c;
/* 125 */ stackString.append(key);
/* 126 */ if (!this.conflictingSets.contains(stackString.toString()))
/* 127 */ if (this.charMap.containsKey(stackString.toString())) {
/* 128 */ outString.append(this.charMap.get(stackString.toString()));
/* 129 */ stackString.setLength(0);
/* */ } else {
/* 131 */ CharSequence sequence = stackString.subSequence(0, stackString.length() - 1);
/* 132 */ stackString.delete(0, stackString.length() - 1);
/* 133 */ flushStack(outString, new StringBuilder(sequence));
/* */ }
/* */ }
/* 136 */ flushStack(outString, stackString);
/* 137 */ return outString.toString();
/* */ }
/* */
/* */ private void flushStack(StringBuilder outString, StringBuilder stackString) {
/* 141 */ while (stackString.length() > 0) {
/* 142 */ if (this.charMap.containsKey(stackString.toString())) {
/* 143 */ outString.append(this.charMap.get(stackString.toString()));
/* 144 */ stackString.setLength(0); continue;
/* */ }
/* 146 */ outString.append("" + stackString.charAt(0));
/* 147 */ stackString.delete(0, 1);
/* */ }
/* */ }
/* */
/* */ String parseOneChar(String c) {
/* 152 */ if (this.charMap.containsKey(c)) {
/* 153 */ return (String)this.charMap.get(c);
/* */ }
/* */
/* 156 */ return c;
/* */ }
/* */
/* */
/* */ public static String getPingYin(String src) {
/* 161 */ char[] t1 = src.toCharArray();
/* 162 */ String[] t2 = new String[t1.length];
/* */
/* 164 */ HanyuPinyinOutputFormat t3 = new HanyuPinyinOutputFormat();
/* 165 */ t3.setCaseType(HanyuPinyinCaseType.LOWERCASE);
/* 166 */ t3.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
/* 167 */ t3.setVCharType(HanyuPinyinVCharType.WITH_U_UNICODE);
/* */
/* 169 */ String t4 = "";
/* 170 */ int t0 = t1.length;
/* */ try {
/* 172 */ for (int i = 0; i < t0; i++) {
/* */
/* 174 */ if (Character.toString(t1[i]).matches("[\\u4E00-\\u9FA5]+")) {
/* 175 */ t2 = PinyinHelper.toHanyuPinyinStringArray(t1[i], t3);
/* 176 */ if (t2 != null && t2.length > 0 && t2[0] != null) {
/* 177 */ t4 = t4 + t2[0];
/* */ }
/* */ } else {
/* */
/* 181 */ t4 = t4 + Character.toString(t1[i]);
/* */ }
/* */ }
/* 184 */ return t4;
/* 185 */ } catch (BadHanyuPinyinOutputFormatCombination e1) {
/* 186 */ System.out.println("拼音转换失败(src)" + e1.getMessage());
/* */
/* 188 */ return t4;
/* */ }
/* */ }
/* */
/* */ public static void main(String[] args) {
/* 193 */ String allValueSimplified = convert("1111", 1);
/* */
/* 195 */ String allValueTraditional = convert("1111", 0);
/* */
/* */
/* 198 */ String allValuePinyin = getPingYin("11111111");
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\convert\ZHConvert.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,36 @@
/* */ package com.archive.common.exception;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class BusinessException
/* */ extends RuntimeException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ protected final String message;
/* */
/* */ public BusinessException(String message) {
/* 16 */ this.message = message;
/* */ }
/* */
/* */
/* */ public BusinessException(String message, Throwable e) {
/* 21 */ super(message, e);
/* 22 */ this.message = message;
/* */ }
/* */
/* */
/* */
/* */ public String getMessage() {
/* 28 */ return this.message;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\BusinessException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,11 @@
package com.archive.common.exception;
public class DemoModeException extends RuntimeException {
private static final long serialVersionUID = 1L;
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\DemoModeException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,32 @@
/* */ package com.archive.common.exception;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class UtilException
/* */ extends RuntimeException
/* */ {
/* */ private static final long serialVersionUID = 8247610319171014183L;
/* */
/* */ public UtilException(Throwable e) {
/* 14 */ super(e.getMessage(), e);
/* */ }
/* */
/* */
/* */ public UtilException(String message) {
/* 19 */ super(message);
/* */ }
/* */
/* */
/* */ public UtilException(String message, Throwable throwable) {
/* 24 */ super(message, throwable);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\UtilException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,109 @@
/* */ package com.archive.common.exception.base;
/* */
/* */ import com.archive.common.utils.MessageUtils;
/* */ import org.springframework.util.StringUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class BaseException
/* */ extends RuntimeException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ private String module;
/* */ private String code;
/* */ private Object[] args;
/* */ private String defaultMessage;
/* */
/* */ public BaseException(String module, String code, Object[] args, String defaultMessage) {
/* 37 */ this.module = module;
/* 38 */ this.code = code;
/* 39 */ this.args = args;
/* 40 */ this.defaultMessage = defaultMessage;
/* */ }
/* */
/* */
/* */ public BaseException(String module, String code, Object[] args) {
/* 45 */ this(module, code, args, null);
/* */ }
/* */
/* */
/* */ public BaseException(String module, String defaultMessage) {
/* 50 */ this(module, null, null, defaultMessage);
/* */ }
/* */
/* */
/* */ public BaseException(String code, Object[] args) {
/* 55 */ this(null, code, args, null);
/* */ }
/* */
/* */
/* */ public BaseException(String defaultMessage) {
/* 60 */ this(null, null, null, defaultMessage);
/* */ }
/* */
/* */
/* */
/* */ public String getMessage() {
/* 66 */ String message = null;
/* 67 */ if (!StringUtils.isEmpty(this.code))
/* */ {
/* 69 */ message = MessageUtils.message(this.code, this.args);
/* */ }
/* 71 */ if (message == null)
/* */ {
/* 73 */ message = this.defaultMessage;
/* */ }
/* 75 */ return message;
/* */ }
/* */
/* */
/* */ public String getModule() {
/* 80 */ return this.module;
/* */ }
/* */
/* */
/* */ public String getCode() {
/* 85 */ return this.code;
/* */ }
/* */
/* */
/* */ public Object[] getArgs() {
/* 90 */ return this.args;
/* */ }
/* */
/* */
/* */ public String getDefaultMessage() {
/* 95 */ return this.defaultMessage;
/* */ }
/* */
/* */
/* */
/* */ public String toString() {
/* 101 */ return getClass() + "{module='" + this.module + '\'' + ", message='" + getMessage() + '\'' + '}';
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\base\BaseException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,24 @@
/* */ package com.archive.common.exception.file;
/* */
/* */ import com.archive.common.exception.base.BaseException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class FileException
/* */ extends BaseException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public FileException(String code, Object[] args) {
/* 16 */ super("file", code, args, null);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\FileException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,22 @@
/* */ package com.archive.common.exception.file;
/* */
/* */ import com.archive.common.exception.file.FileException;
/* */
/* */
/* */
/* */
/* */ public class FileNameLengthLimitExceededException
/* */ extends FileException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public FileNameLengthLimitExceededException(int defaultFileNameLength) {
/* 14 */ super("upload.filename.exceed.length", new Object[] { Integer.valueOf(defaultFileNameLength) });
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\FileNameLengthLimitExceededException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,22 @@
/* */ package com.archive.common.exception.file;
/* */
/* */ import com.archive.common.exception.file.FileException;
/* */
/* */
/* */
/* */
/* */ public class FileSizeLimitExceededException
/* */ extends FileException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public FileSizeLimitExceededException(long defaultMaxSize) {
/* 14 */ super("upload.exceed.maxSize", new Object[] { Long.valueOf(defaultMaxSize) });
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\FileSizeLimitExceededException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,66 @@
/* */ package com.archive.common.exception.file;
/* */
/* */ import com.archive.common.exception.file.InvalidExtensionException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class InvalidFlashExtensionException
/* */ extends InvalidExtensionException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename) {
/* 58 */ super(allowedExtension, extension, filename);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\InvalidExtensionException$InvalidFlashExtensionException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,56 @@
/* */ package com.archive.common.exception.file;
/* */
/* */ import com.archive.common.exception.file.InvalidExtensionException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class InvalidImageExtensionException
/* */ extends InvalidExtensionException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename) {
/* 48 */ super(allowedExtension, extension, filename);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\InvalidExtensionException$InvalidImageExtensionException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,76 @@
/* */ package com.archive.common.exception.file;
/* */
/* */ import com.archive.common.exception.file.InvalidExtensionException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class InvalidMediaExtensionException
/* */ extends InvalidExtensionException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename) {
/* 68 */ super(allowedExtension, extension, filename);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\InvalidExtensionException$InvalidMediaExtensionException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,86 @@
/* */ package com.archive.common.exception.file;
/* */
/* */ import com.archive.common.exception.file.InvalidExtensionException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class InvalidVideoExtensionException
/* */ extends InvalidExtensionException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public InvalidVideoExtensionException(String[] allowedExtension, String extension, String filename) {
/* 78 */ super(allowedExtension, extension, filename);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\InvalidExtensionException$InvalidVideoExtensionException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,47 @@
/* */ package com.archive.common.exception.file;
/* */
/* */ import java.util.Arrays;
/* */ import org.apache.commons.fileupload.FileUploadException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class InvalidExtensionException
/* */ extends FileUploadException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ private String[] allowedExtension;
/* */ private String extension;
/* */ private String filename;
/* */
/* */ public InvalidExtensionException(String[] allowedExtension, String extension, String filename) {
/* 21 */ super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString((Object[])allowedExtension) + "]");
/* 22 */ this.allowedExtension = allowedExtension;
/* 23 */ this.extension = extension;
/* 24 */ this.filename = filename;
/* */ }
/* */
/* */
/* */ public String[] getAllowedExtension() {
/* 29 */ return this.allowedExtension;
/* */ }
/* */
/* */
/* */ public String getExtension() {
/* 34 */ return this.extension;
/* */ }
/* */
/* */
/* */ public String getFilename() {
/* 39 */ return this.filename;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\InvalidExtensionException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,39 @@
/* */ package com.archive.common.exception.job;
/* */
/* */ import com.archive.common.exception.job.TaskException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public enum Code
/* */ {
/* 32 */ TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE;
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\job\TaskException$Code.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,35 @@
/* */ package com.archive.common.exception.job;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class TaskException
/* */ extends Exception
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ private Code code;
/* */
/* */ public TaskException(String msg, Code code) {
/* 16 */ this(msg, code, null);
/* */ }
/* */
/* */
/* */ public TaskException(String msg, Code code, Exception nestedEx) {
/* 21 */ super(msg, nestedEx);
/* 22 */ this.code = code;
/* */ }
/* */
/* */
/* */ public Code getCode() {
/* 27 */ return this.code;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\job\TaskException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,22 @@
/* */ package com.archive.common.exception.user;
/* */
/* */ import com.archive.common.exception.user.UserException;
/* */
/* */
/* */
/* */
/* */ public class CaptchaException
/* */ extends UserException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public CaptchaException() {
/* 14 */ super("user.jcaptcha.error", null);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\CaptchaException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,22 @@
/* */ package com.archive.common.exception.user;
/* */
/* */ import com.archive.common.exception.user.UserException;
/* */
/* */
/* */
/* */
/* */ public class RoleBlockedException
/* */ extends UserException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public RoleBlockedException() {
/* 14 */ super("role.blocked", null);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\RoleBlockedException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,22 @@
/* */ package com.archive.common.exception.user;
/* */
/* */ import com.archive.common.exception.user.UserException;
/* */
/* */
/* */
/* */
/* */ public class UserBlockedException
/* */ extends UserException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public UserBlockedException() {
/* 14 */ super("user.blocked", null);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserBlockedException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,22 @@
/* */ package com.archive.common.exception.user;
/* */
/* */ import com.archive.common.exception.user.UserException;
/* */
/* */
/* */
/* */
/* */ public class UserDeleteException
/* */ extends UserException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public UserDeleteException() {
/* 14 */ super("user.password.delete", null);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserDeleteException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,24 @@
/* */ package com.archive.common.exception.user;
/* */
/* */ import com.archive.common.exception.base.BaseException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class UserException
/* */ extends BaseException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public UserException(String code, Object[] args) {
/* 16 */ super("user", code, args, null);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,22 @@
/* */ package com.archive.common.exception.user;
/* */
/* */ import com.archive.common.exception.user.UserException;
/* */
/* */
/* */
/* */
/* */ public class UserNotExistsException
/* */ extends UserException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public UserNotExistsException() {
/* 14 */ super("user.not.exists", null);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserNotExistsException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,22 @@
/* */ package com.archive.common.exception.user;
/* */
/* */ import com.archive.common.exception.user.UserException;
/* */
/* */
/* */
/* */
/* */ public class UserPasswordNotMatchException
/* */ extends UserException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public UserPasswordNotMatchException() {
/* 14 */ super("user.password.not.match", null);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserPasswordNotMatchException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,22 @@
/* */ package com.archive.common.exception.user;
/* */
/* */ import com.archive.common.exception.user.UserException;
/* */
/* */
/* */
/* */
/* */ public class UserPasswordRetryLimitCountException
/* */ extends UserException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public UserPasswordRetryLimitCountException(int retryLimitCount) {
/* 14 */ super("user.password.retry.limit.count", new Object[] { Integer.valueOf(retryLimitCount) });
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserPasswordRetryLimitCountException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,22 @@
/* */ package com.archive.common.exception.user;
/* */
/* */ import com.archive.common.exception.user.UserException;
/* */
/* */
/* */
/* */
/* */ public class UserPasswordRetryLimitExceedException
/* */ extends UserException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public UserPasswordRetryLimitExceedException(int retryLimitCount) {
/* 14 */ super("user.password.retry.limit.exceed", new Object[] { Integer.valueOf(retryLimitCount) });
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserPasswordRetryLimitExceedException.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,61 @@
/* */ package com.archive.common.ocr;
/* */
/* */ import com.archive.common.convert.ImgConvert;
/* */ import java.io.File;
/* */ import net.sourceforge.tess4j.Tesseract;
/* */ import net.sourceforge.tess4j.util.LoadLibs;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class ImageOcr
/* */ {
/* */ public static String ImageOcr(String imagPath) {
/* 18 */ String res = "";
/* */ try {
/* 20 */ String pngPath = "";
/* */
/* 22 */ if (imagPath.contains(".jpg") || imagPath.contains(".jpeg")) {
/* 23 */ File fil = new File(imagPath);
/* */
/* 25 */ pngPath = fil.getParentFile().getPath() + File.separator + fil.getName().replace(".jpg", ".png").replace(".jpeg", ".png");
/* 26 */ ImgConvert.JpgToPng(imagPath, pngPath);
/* */ }
/* */
/* */
/* 30 */ Tesseract tesseract = new Tesseract();
/* */
/* 32 */ File tessDataFolder = LoadLibs.extractTessResources("tessdata");
/* 33 */ tesseract.setDatapath(tessDataFolder.getAbsolutePath());
/* */
/* 35 */ tesseract.setLanguage("chi_sim");
/* */
/* 37 */ String result = "";
/* 38 */ if (pngPath.equals("")) {
/* 39 */ result = tesseract.doOCR(new File(imagPath));
/* */ } else {
/* 41 */ result = tesseract.doOCR(new File(pngPath));
/* */ }
/* */
/* 44 */ res = result.replaceAll("\\r|\\n", "-").replaceAll(" ", "");
/* 45 */ } catch (Exception ex) {
/* 46 */ System.out.println("图片OCR出现异常:" + ex.getMessage());
/* */
/* */
/* 49 */ if (ex.getMessage().equals("javax.imageio.IIOException: JFIF APP0 must be first marker after SOI"));
/* */ }
/* */
/* */
/* 53 */ return res;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\ocr\ImageOcr.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,96 @@
/* */ package com.archive.common.ocr;
/* */
/* */ import java.awt.image.BufferedImage;
/* */ import java.io.File;
/* */ import javax.imageio.ImageIO;
/* */ import net.sourceforge.tess4j.Tesseract;
/* */ import net.sourceforge.tess4j.util.LoadLibs;
/* */ import org.apache.pdfbox.pdmodel.PDDocument;
/* */ import org.apache.pdfbox.rendering.PDFRenderer;
/* */ import org.apache.pdfbox.text.PDFTextStripper;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class PdfOcr
/* */ {
/* */ public static String getTextFromPdf(String pdfPath, String pdfSpiltImagePath) throws Exception {
/* 29 */ File pdffile = new File(pdfPath);
/* 30 */ PDDocument doc = PDDocument.load(pdffile);
/* 31 */ String text = (new PDFTextStripper()).getText(doc);
/* 32 */ String result = text.replace("\n", "");
/* 33 */ result = result.replace("\r", "");
/* 34 */ if (result.equals("")) {
/* */
/* */
/* */
/* 38 */ String name = pdffile.getName().substring(0, pdffile.getName().lastIndexOf("."));
/* */
/* 40 */ String hz = pdffile.getName().substring(pdffile.getName().lastIndexOf(".") + 1);
/* 41 */ String imageRootPath = pdfSpiltImagePath + File.separator + name;
/* 42 */ File imagePathFile = new File(imageRootPath);
/* 43 */ if (!imagePathFile.exists()) {
/* 44 */ imagePathFile.mkdirs();
/* */ }
/* */
/* 47 */ pdfToImg(pdffile, imageRootPath, name);
/* 48 */ String res = "";
/* 49 */ for (int i = 0; i < (imagePathFile.listFiles()).length; i++) {
/* 50 */ Tesseract tesseract = new Tesseract();
/* */
/* 52 */ File tessDataFolder = LoadLibs.extractTessResources("tessdata");
/* 53 */ tesseract.setDatapath(tessDataFolder.getAbsolutePath());
/* */
/* 55 */ tesseract.setLanguage("chi_sim");
/* */
/* 57 */ String context = tesseract.doOCR(imagePathFile.listFiles()[i]);
/* */
/* 59 */ context = context.replaceAll("\\r|\\n", "-").replaceAll(" ", "");
/* 60 */ res = res + context + "\n";
/* */ }
/* */
/* 63 */ imagePathFile.setWritable(true, false);
/* 64 */ imagePathFile.delete();
/* 65 */ text = res;
/* */ }
/* 67 */ return text;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static void pdfToImg(File file, String imagePath, String fileName) {
/* */ try {
/* 76 */ PDDocument doc = PDDocument.load(file);
/* 77 */ PDFRenderer renderer = new PDFRenderer(doc);
/* 78 */ int pageCount = doc.getNumberOfPages();
/* */
/* 80 */ for (int i = 0; i < pageCount; i++) {
/* */
/* 82 */ BufferedImage image = renderer.renderImageWithDPI(i, 144.0F);
/* */
/* 84 */ ImageIO.write(image, "png", new File(imagePath + File.separator + fileName + i + ".png"));
/* */ }
/* 86 */ } catch (Exception e) {
/* 87 */ e.printStackTrace();
/* */ }
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\ocr\PdfOcr.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,61 @@
/* */ package com.archive.common.utils;
/* */
/* */ import com.alibaba.fastjson.JSONObject;
/* */ import com.archive.common.utils.IpUtils;
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.http.HttpUtils;
/* */ import com.archive.framework.config.ArchiveConfig;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */ public class AddressUtils
/* */ {
/* 17 */ private static final Logger log = LoggerFactory.getLogger(com.archive.common.utils.AddressUtils.class);
/* */
/* */
/* */ public static final String IP_URL = "http://whois.pconline.com.cn/ipJson.jsp";
/* */
/* */
/* */ public static final String UNKNOWN = "XX XX";
/* */
/* */
/* */ public static String getRealAddressByIP(String ip) {
/* 27 */ String address = "XX XX";
/* */
/* 29 */ if (IpUtils.internalIp(ip))
/* */ {
/* 31 */ return "内网IP";
/* */ }
/* 33 */ if (ArchiveConfig.isAddressEnabled()) {
/* */
/* */ try {
/* */
/* 37 */ String rspStr = HttpUtils.sendGet("http://whois.pconline.com.cn/ipJson.jsp", "ip=" + ip + "&json=true", "GBK");
/* 38 */ if (StringUtils.isEmpty(rspStr)) {
/* */
/* 40 */ log.error("获取地理位置异常 {}", ip);
/* 41 */ return "XX XX";
/* */ }
/* 43 */ JSONObject obj = JSONObject.parseObject(rspStr);
/* 44 */ String region = obj.getString("pro");
/* 45 */ String city = obj.getString("city");
/* 46 */ return String.format("%s %s", new Object[] { region, city });
/* */ }
/* 48 */ catch (Exception e) {
/* */
/* 50 */ log.error("获取地理位置异常 {}", e);
/* */ }
/* */ }
/* 53 */ return address;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\AddressUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,122 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import java.math.BigDecimal;
/* */ import java.math.RoundingMode;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Arith
/* */ {
/* */ private static final int DEF_DIV_SCALE = 10;
/* */
/* */ public static double add(double v1, double v2) {
/* 30 */ BigDecimal b1 = new BigDecimal(Double.toString(v1));
/* 31 */ BigDecimal b2 = new BigDecimal(Double.toString(v2));
/* 32 */ return b1.add(b2).doubleValue();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static double sub(double v1, double v2) {
/* 43 */ BigDecimal b1 = new BigDecimal(Double.toString(v1));
/* 44 */ BigDecimal b2 = new BigDecimal(Double.toString(v2));
/* 45 */ return b1.subtract(b2).doubleValue();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static double mul(double v1, double v2) {
/* 56 */ BigDecimal b1 = new BigDecimal(Double.toString(v1));
/* 57 */ BigDecimal b2 = new BigDecimal(Double.toString(v2));
/* 58 */ return b1.multiply(b2).doubleValue();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static double div(double v1, double v2) {
/* 70 */ return div(v1, v2, 10);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static double div(double v1, double v2, int scale) {
/* 83 */ if (scale < 0)
/* */ {
/* 85 */ throw new IllegalArgumentException("The scale must be a positive integer or zero");
/* */ }
/* */
/* 88 */ BigDecimal b1 = new BigDecimal(Double.toString(v1));
/* 89 */ BigDecimal b2 = new BigDecimal(Double.toString(v2));
/* 90 */ if (b1.compareTo(BigDecimal.ZERO) == 0)
/* */ {
/* 92 */ return BigDecimal.ZERO.doubleValue();
/* */ }
/* 94 */ return b1.divide(b2, scale, RoundingMode.HALF_UP).doubleValue();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static double round(double v, int scale) {
/* 105 */ if (scale < 0)
/* */ {
/* 107 */ throw new IllegalArgumentException("The scale must be a positive integer or zero");
/* */ }
/* */
/* 110 */ BigDecimal b = new BigDecimal(Double.toString(v));
/* 111 */ BigDecimal one = new BigDecimal("1");
/* 112 */ return b.divide(one, scale, RoundingMode.HALF_UP).doubleValue();
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\Arith.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,205 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import com.archive.common.utils.spring.SpringUtils;
/* */ import java.util.Iterator;
/* */ import java.util.Set;
/* */ import org.apache.shiro.cache.Cache;
/* */ import org.apache.shiro.cache.CacheManager;
/* */ import org.apache.shiro.cache.ehcache.EhCacheManager;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class CacheUtils
/* */ {
/* 19 */ private static Logger logger = LoggerFactory.getLogger(com.archive.common.utils.CacheUtils.class);
/* */
/* 21 */ private static CacheManager cacheManager = (CacheManager)SpringUtils.getBean(CacheManager.class);
/* */
/* */
/* */
/* */
/* */ private static final String SYS_CACHE = "sys-cache";
/* */
/* */
/* */
/* */
/* */
/* */ public static Object get(String key) {
/* 33 */ return get("sys-cache", key);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static Object get(String key, Object defaultValue) {
/* 45 */ Object value = get(key);
/* 46 */ return (value != null) ? value : defaultValue;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void put(String key, Object value) {
/* 57 */ put("sys-cache", key, value);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void remove(String key) {
/* 68 */ remove("sys-cache", key);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static Object get(String cacheName, String key) {
/* 80 */ return getCache(cacheName).get(getKey(key));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static Object get(String cacheName, String key, Object defaultValue) {
/* 93 */ Object value = get(cacheName, getKey(key));
/* 94 */ return (value != null) ? value : defaultValue;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void put(String cacheName, String key, Object value) {
/* 106 */ getCache(cacheName).put(getKey(key), value);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void remove(String cacheName, String key) {
/* 117 */ getCache(cacheName).remove(getKey(key));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void removeAll(String cacheName) {
/* 127 */ Cache<String, Object> cache = getCache(cacheName);
/* 128 */ Set<String> keys = cache.keys();
/* 129 */ for (Iterator<String> it = keys.iterator(); it.hasNext();)
/* */ {
/* 131 */ cache.remove(it.next());
/* */ }
/* 133 */ logger.info("清理缓存: {} => {}", cacheName, keys);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void removeByKeys(Set<String> keys) {
/* 143 */ removeByKeys("sys-cache", keys);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void removeByKeys(String cacheName, Set<String> keys) {
/* 154 */ for (Iterator<String> it = keys.iterator(); it.hasNext();)
/* */ {
/* 156 */ remove(it.next());
/* */ }
/* 158 */ logger.info("清理缓存: {} => {}", cacheName, keys);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private static String getKey(String key) {
/* 169 */ return key;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static Cache<String, Object> getCache(String cacheName) {
/* 180 */ Cache<String, Object> cache = cacheManager.getCache(cacheName);
/* 181 */ if (cache == null)
/* */ {
/* 183 */ throw new RuntimeException("当前系统中没有定义“" + cacheName + "”这个缓存。");
/* */ }
/* 185 */ return cache;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String[] getCacheNames() {
/* 195 */ return ((EhCacheManager)cacheManager).getCacheManager().getCacheNames();
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\CacheUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,146 @@
/* */ package com.archive.common.utils
;
/* */
/* */ import java.io.UnsupportedEncodingException;
/* */ import java.net.URLDecoder;
/* */ import java.net.URLEncoder;
/* */ import javax.servlet.http.Cookie;
/* */ import javax.servlet.http.HttpServletRequest;
/* */ import javax.servlet.http.HttpServletResponse;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class CookieUtils
/* */ {
/* */ public static void setCookie(HttpServletResponse response, String name, String value) {
/* 25 */ setCookie(response, name, value, 86400);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void setCookie(HttpServletResponse response, String name, String value, String path) {
/* 38 */ setCookie(response, name, value, path, 86400);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void setCookie(HttpServletResponse response, String name, String value, int maxAge) {
/* 51 */ setCookie(response, name, value, "/", maxAge);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void setCookie(HttpServletResponse response, String name, String value, String path, int maxAge) {
/* 64 */ Cookie cookie = new Cookie(name, null);
/* 65 */ cookie.setPath(path);
/* 66 */ cookie.setMaxAge(maxAge);
/* */
/* */ try {
/* 69 */ cookie.setValue(URLEncoder.encode(value, "utf-8"));
/* */ }
/* 71 */ catch (UnsupportedEncodingException e) {
/* */
/* 73 */ e.printStackTrace();
/* */ }
/* 75 */ response.addCookie(cookie);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getCookie(HttpServletRequest request, String name) {
/* 86 */ return getCookie(request, null, name, false);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getCookie(HttpServletRequest request, HttpServletResponse response, String name) {
/* 97 */ return getCookie(request, response, name, true);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getCookie(HttpServletRequest request, HttpServletResponse response, String name, boolean isRemove) {
/* 112 */ String value = null;
/* 113 */ Cookie[] cookies = request.getCookies();
/* 114 */ if (cookies != null)
/* */ {
/* 116 */ for (Cookie cookie : cookies) {
/* */
/* 118 */ if (cookie.getName().equals(name)) {
/* */
/* */
/* */ try {
/* 122 */ value = URLDecoder.decode(cookie.getValue(), "utf-8");
/* */ }
/* 124 */ catch (UnsupportedEncodingException e) {
/* */
/* 126 */ e.printStackTrace();
/* */ }
/* 128 */ if (isRemove) {
/* */
/* 130 */ cookie.setMaxAge(0);
/* 131 */ response.addCookie(cookie);
/* */ }
/* */ }
/* */ }
/* */ }
/* 136 */ return value;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\CookieUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,171 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import java.lang.management.ManagementFactory;
/* */ import java.text.ParseException;
/* */ import java.text.SimpleDateFormat;
/* */ import java.util.Date;
/* */ import org.apache.commons.lang3.time.DateFormatUtils;
/* */ import org.apache.commons.lang3.time.DateUtils;
/* */
/* */
/* */
/* */
/* */ public class DateUtils
/* */ extends DateUtils
/* */ {
/* 16 */ public static String YYYY = "yyyy";
/* */
/* 18 */ public static String YYYY_MM = "yyyy-MM";
/* */
/* 20 */ public static String YYYY_MM_DD = "yyyy-MM-dd";
/* */
/* 22 */ public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
/* */
/* 24 */ public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
/* */
/* 26 */ private static String[] parsePatterns = new String[] { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM" };
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static Date getNowDate() {
/* 38 */ return new Date();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getDate() {
/* 48 */ return dateTimeNow(YYYY_MM_DD);
/* */ }
/* */
/* */
/* */ public static final String getTime() {
/* 53 */ return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
/* */ }
/* */
/* */
/* */ public static final String dateTimeNow() {
/* 58 */ return dateTimeNow(YYYYMMDDHHMMSS);
/* */ }
/* */
/* */
/* */ public static final String dateTimeNow(String format) {
/* 63 */ return parseDateToStr(format, new Date());
/* */ }
/* */
/* */
/* */ public static final String dateTime(Date date) {
/* 68 */ return parseDateToStr(YYYY_MM_DD, date);
/* */ }
/* */
/* */
/* */ public static final String parseDateToStr(String format, Date date) {
/* 73 */ return (new SimpleDateFormat(format)).format(date);
/* */ }
/* */
/* */
/* */
/* */ public static final Date dateTime(String format, String ts) {
/* */ try {
/* 80 */ return (new SimpleDateFormat(format)).parse(ts);
/* */ }
/* 82 */ catch (ParseException e) {
/* */
/* 84 */ throw new RuntimeException(e);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static final String datePath() {
/* 93 */ Date now = new Date();
/* 94 */ return DateFormatUtils.format(now, "yyyy/MM/dd");
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static final String dateTime() {
/* 102 */ Date now = new Date();
/* 103 */ return DateFormatUtils.format(now, "yyyyMMdd");
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static Date parseDate(Object str) {
/* 111 */ if (str == null)
/* */ {
/* 113 */ return null;
/* */ }
/* */
/* */ try {
/* 117 */ return parseDate(str.toString(), parsePatterns);
/* */ }
/* 119 */ catch (ParseException e) {
/* */
/* 121 */ return null;
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static Date getServerStartDate() {
/* 130 */ long time = ManagementFactory.getRuntimeMXBean().getStartTime();
/* 131 */ return new Date(time);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static int differentDaysByMillisecond(Date date1, Date date2) {
/* 139 */ return Math.abs((int)((date2.getTime() - date1.getTime()) / 86400000L));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static String getDatePoor(Date endDate, Date nowDate) {
/* 147 */ long nd = 86400000L;
/* 148 */ long nh = 3600000L;
/* 149 */ long nm = 60000L;
/* */
/* */
/* 152 */ long diff = endDate.getTime() - nowDate.getTime();
/* */
/* 154 */ long day = diff / nd;
/* */
/* 156 */ long hour = diff % nd / nh;
/* */
/* 158 */ long min = diff % nd % nh / nm;
/* */
/* */
/* 161 */ return day + "天" + hour + "小时" + min + "分钟";
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\DateUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,49 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import com.archive.common.utils.StringUtils;
/* */ import java.io.PrintWriter;
/* */ import java.io.StringWriter;
/* */ import org.apache.commons.lang3.exception.ExceptionUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class ExceptionUtil
/* */ {
/* */ public static String getExceptionMessage(Throwable e) {
/* 20 */ StringWriter sw = new StringWriter();
/* 21 */ e.printStackTrace(new PrintWriter(sw, true));
/* 22 */ String str = sw.toString();
/* 23 */ return str;
/* */ }
/* */
/* */
/* */ public static String getRootErrorMseeage(Exception e) {
/* 28 */ Throwable root = ExceptionUtils.getRootCause(e);
/* 29 */ root = (root == null) ? e : root;
/* 30 */ if (root == null)
/* */ {
/* 32 */ return "";
/* */ }
/* 34 */ String msg = root.getMessage();
/* 35 */ if (msg == null)
/* */ {
/* 37 */ return "null";
/* */ }
/* 39 */ return StringUtils.defaultString(msg);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\ExceptionUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,203 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import com.archive.common.utils.StringUtils;
/* */ import java.net.InetAddress;
/* */ import java.net.UnknownHostException;
/* */ import javax.servlet.http.HttpServletRequest;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class IpUtils
/* */ {
/* */ public static String getIpAddr(HttpServletRequest request) {
/* 16 */ if (request == null)
/* */ {
/* 18 */ return "unknown";
/* */ }
/* 20 */ String ip = request.getHeader("x-forwarded-for");
/* 21 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
/* */ {
/* 23 */ ip = request.getHeader("Proxy-Client-IP");
/* */ }
/* 25 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
/* */ {
/* 27 */ ip = request.getHeader("X-Forwarded-For");
/* */ }
/* 29 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
/* */ {
/* 31 */ ip = request.getHeader("WL-Proxy-Client-IP");
/* */ }
/* 33 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
/* */ {
/* 35 */ ip = request.getHeader("X-Real-IP");
/* */ }
/* */
/* 38 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
/* */ {
/* 40 */ ip = request.getRemoteAddr();
/* */ }
/* */
/* 43 */ return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
/* */ }
/* */
/* */
/* */ public static boolean internalIp(String ip) {
/* 48 */ byte[] addr = textToNumericFormatV4(ip);
/* 49 */ return (internalIp(addr) || "127.0.0.1".equals(ip));
/* */ }
/* */
/* */
/* */ private static boolean internalIp(byte[] addr) {
/* 54 */ if (StringUtils.isNull(addr) || addr.length < 2)
/* */ {
/* 56 */ return true;
/* */ }
/* 58 */ byte b0 = addr[0];
/* 59 */ byte b1 = addr[1];
/* */
/* 61 */ byte SECTION_1 = 10;
/* */
/* 63 */ byte SECTION_2 = -84;
/* 64 */ byte SECTION_3 = 16;
/* 65 */ byte SECTION_4 = 31;
/* */
/* 67 */ byte SECTION_5 = -64;
/* 68 */ byte SECTION_6 = -88;
/* 69 */ switch (b0) {
/* */
/* */ case 10:
/* 72 */ return true;
/* */ case -84:
/* 74 */ if (b1 >= 16 && b1 <= 31)
/* */ {
/* 76 */ return true;
/* */ }
/* */ case -64:
/* 79 */ switch (b1) {
/* */
/* */ case -88:
/* 82 */ return true;
/* */ } break;
/* */ }
/* 85 */ return false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static byte[] textToNumericFormatV4(String text) {
/* 97 */ if (text.length() == 0)
/* */ {
/* 99 */ return null;
/* */ }
/* */
/* 102 */ byte[] bytes = new byte[4];
/* 103 */ String[] elements = text.split("\\.", -1);
/* */
/* */ try {
/* */ long l;
/* */ int i;
/* 108 */ switch (elements.length) {
/* */
/* */ case 1:
/* 111 */ l = Long.parseLong(elements[0]);
/* 112 */ if (l < 0L || l > 4294967295L) {
/* 113 */ return null;
/* */ }
/* 115 */ bytes[0] = (byte)(int)(l >> 24L & 0xFFL);
/* 116 */ bytes[1] = (byte)(int)((l & 0xFFFFFFL) >> 16L & 0xFFL);
/* 117 */ bytes[2] = (byte)(int)((l & 0xFFFFL) >> 8L & 0xFFL);
/* 118 */ bytes[3] = (byte)(int)(l & 0xFFL);
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* 168 */ return bytes;case 2: l = Integer.parseInt(elements[0]); if (l < 0L || l > 255L) return null; bytes[0] = (byte)(int)(l & 0xFFL); l = Integer.parseInt(elements[1]); if (l < 0L || l > 16777215L) return null; bytes[1] = (byte)(int)(l >> 16L & 0xFFL); bytes[2] = (byte)(int)((l & 0xFFFFL) >> 8L & 0xFFL); bytes[3] = (byte)(int)(l & 0xFFL); return bytes;case 3: for (i = 0; i < 2; i++) { l = Integer.parseInt(elements[i]); if (l < 0L || l > 255L) return null; bytes[i] = (byte)(int)(l & 0xFFL); } l = Integer.parseInt(elements[2]); if (l < 0L || l > 65535L) return null; bytes[2] = (byte)(int)(l >> 8L & 0xFFL); bytes[3] = (byte)(int)(l & 0xFFL); return bytes;case 4: for (i = 0; i < 4; i++) { l = Integer.parseInt(elements[i]); if (l < 0L || l > 255L) return null; bytes[i] = (byte)(int)(l & 0xFFL); } return bytes;
/* */ }
/* */ return null;
/* */ } catch (NumberFormatException e) {
/* */ return null;
/* */ } } public static String getHostIp() {
/* */ try {
/* 175 */ return InetAddress.getLocalHost().getHostAddress();
/* */ }
/* 177 */ catch (UnknownHostException unknownHostException) {
/* */
/* */
/* 180 */ return "127.0.0.1";
/* */ }
/* */ }
/* */
/* */
/* */ public static String getHostName() {
/* */ try {
/* 187 */ return InetAddress.getLocalHost().getHostName();
/* */ }
/* 189 */ catch (UnknownHostException unknownHostException) {
/* */
/* */
/* 192 */ return "未知";
/* */ }
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\IpUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,142 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import com.alibaba.fastjson.JSON;
/* */ import com.archive.common.utils.IpUtils;
/* */ import java.io.PrintWriter;
/* */ import java.io.StringWriter;
/* */ import java.util.Map;
/* */ import javax.servlet.http.HttpServletRequest;
/* */ import org.apache.shiro.SecurityUtils;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */ public class LogUtils
/* */ {
/* 19 */ public static final Logger ERROR_LOG = LoggerFactory.getLogger("sys-error");
/* 20 */ public static final Logger ACCESS_LOG = LoggerFactory.getLogger("sys-access");
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void logAccess(HttpServletRequest request) {
/* 29 */ String username = getUsername();
/* 30 */ String jsessionId = request.getRequestedSessionId();
/* 31 */ String ip = IpUtils.getIpAddr(request);
/* 32 */ String accept = request.getHeader("accept");
/* 33 */ String userAgent = request.getHeader("User-Agent");
/* 34 */ String url = request.getRequestURI();
/* 35 */ String params = getParams(request);
/* */
/* 37 */ StringBuilder s = new StringBuilder();
/* 38 */ s.append(getBlock(username));
/* 39 */ s.append(getBlock(jsessionId));
/* 40 */ s.append(getBlock(ip));
/* 41 */ s.append(getBlock(accept));
/* 42 */ s.append(getBlock(userAgent));
/* 43 */ s.append(getBlock(url));
/* 44 */ s.append(getBlock(params));
/* 45 */ s.append(getBlock(request.getHeader("Referer")));
/* 46 */ getAccessLog().info(s.toString());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void logError(String message, Throwable e) {
/* 57 */ String username = getUsername();
/* 58 */ StringBuilder s = new StringBuilder();
/* 59 */ s.append(getBlock("exception"));
/* 60 */ s.append(getBlock(username));
/* 61 */ s.append(getBlock(message));
/* 62 */ ERROR_LOG.error(s.toString(), e);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void logPageError(HttpServletRequest request) {
/* 72 */ String username = getUsername();
/* */
/* 74 */ Integer statusCode = (Integer)request.getAttribute("javax.servlet.error.status_code");
/* 75 */ String message = (String)request.getAttribute("javax.servlet.error.message");
/* 76 */ String uri = (String)request.getAttribute("javax.servlet.error.request_uri");
/* 77 */ Throwable t = (Throwable)request.getAttribute("javax.servlet.error.exception");
/* */
/* 79 */ if (statusCode == null)
/* */ {
/* 81 */ statusCode = Integer.valueOf(0);
/* */ }
/* */
/* 84 */ StringBuilder s = new StringBuilder();
/* 85 */ s.append(getBlock((t == null) ? "page" : "exception"));
/* 86 */ s.append(getBlock(username));
/* 87 */ s.append(getBlock(statusCode));
/* 88 */ s.append(getBlock(message));
/* 89 */ s.append(getBlock(IpUtils.getIpAddr(request)));
/* */
/* 91 */ s.append(getBlock(uri));
/* 92 */ s.append(getBlock(request.getHeader("Referer")));
/* 93 */ StringWriter sw = new StringWriter();
/* */
/* 95 */ while (t != null) {
/* */
/* 97 */ t.printStackTrace(new PrintWriter(sw));
/* 98 */ t = t.getCause();
/* */ }
/* 100 */ s.append(getBlock(sw.toString()));
/* 101 */ getErrorLog().error(s.toString());
/* */ }
/* */
/* */
/* */
/* */ public static String getBlock(Object msg) {
/* 107 */ if (msg == null)
/* */ {
/* 109 */ msg = "";
/* */ }
/* 111 */ return "[" + msg.toString() + "]";
/* */ }
/* */
/* */
/* */ protected static String getParams(HttpServletRequest request) {
/* 116 */ Map<String, String[]> params = request.getParameterMap();
/* 117 */ return JSON.toJSONString(params);
/* */ }
/* */
/* */
/* */ protected static String getUsername() {
/* 122 */ return (String)SecurityUtils.getSubject().getPrincipal();
/* */ }
/* */
/* */
/* */ public static Logger getAccessLog() {
/* 127 */ return ACCESS_LOG;
/* */ }
/* */
/* */
/* */ public static Logger getErrorLog() {
/* 132 */ return ERROR_LOG;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\LogUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,62 @@
/* */ package com.archive.common.utils
;
/* */
/* */ import java.util.HashMap;
/* */ import java.util.Iterator;
/* */ import java.util.Map;
/* */ import javax.servlet.http.HttpServletRequest;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class MapDataUtil
/* */ {
/* */ public static Map<String, Object> convertDataMap(HttpServletRequest request) {
/* 18 */ Map<String, String[]> properties = request.getParameterMap();
/* 19 */ Map<String, Object> returnMap = new HashMap<>();
/* 20 */ Iterator<?> entries = properties.entrySet().iterator();
/* */
/* 22 */ String name = "";
/* 23 */ String value = "";
/* 24 */ while (entries.hasNext()) {
/* */
/* 26 */ Map.Entry<?, ?> entry = (Map.Entry<?, ?>)entries.next();
/* 27 */ name = (String)entry.getKey();
/* 28 */ Object valueObj = entry.getValue();
/* 29 */ if (null == valueObj) {
/* */
/* 31 */ value = "";
/* */ }
/* 33 */ else if (valueObj instanceof String[]) {
/* */
/* 35 */ String[] values = (String[])valueObj;
/* 36 */ value = "";
/* 37 */ for (int i = 0; i < values.length; i++)
/* */ {
/* 39 */ value = value + values[i] + ",";
/* */ }
/* 41 */ if (value.length() > 0)
/* */ {
/* 43 */ value = value.substring(0, value.length() - 1);
/* */ }
/* */ }
/* */ else {
/* */
/* 48 */ value = valueObj.toString();
/* */ }
/* 50 */ returnMap.put(name, value);
/* */ }
/* 52 */ return returnMap;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\MapDataUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,74 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import java.security.MessageDigest;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Md5Utils
/* */ {
/* 14 */ private static final Logger log = LoggerFactory.getLogger(com.archive.common.utils.Md5Utils.class);
/* */
/* */
/* */
/* */
/* */ private static byte[] md5(String s) {
/* */ try {
/* 21 */ MessageDigest algorithm = MessageDigest.getInstance("MD5");
/* 22 */ algorithm.reset();
/* 23 */ algorithm.update(s.getBytes("UTF-8"));
/* 24 */ byte[] messageDigest = algorithm.digest();
/* 25 */ return messageDigest;
/* */ }
/* 27 */ catch (Exception e) {
/* */
/* 29 */ log.error("MD5 Error...", e);
/* */
/* 31 */ return null;
/* */ }
/* */ }
/* */
/* */ private static final String toHex(byte[] hash) {
/* 36 */ if (hash == null)
/* */ {
/* 38 */ return null;
/* */ }
/* 40 */ StringBuffer buf = new StringBuffer(hash.length * 2);
/* */
/* */
/* 43 */ for (int i = 0; i < hash.length; i++) {
/* */
/* 45 */ if ((hash[i] & 0xFF) < 16)
/* */ {
/* 47 */ buf.append("0");
/* */ }
/* 49 */ buf.append(Long.toString((hash[i] & 0xFF), 16));
/* */ }
/* 51 */ return buf.toString();
/* */ }
/* */
/* */
/* */
/* */ public static String hash(String s) {
/* */ try {
/* 58 */ return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8");
/* */ }
/* 60 */ catch (Exception e) {
/* */
/* 62 */ log.error("not supported charset...{}", e);
/* 63 */ return s;
/* */ }
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\Md5Utils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,34 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import com.archive.common.utils.spring.SpringUtils;
/* */ import org.springframework.context.MessageSource;
/* */ import org.springframework.context.i18n.LocaleContextHolder;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class MessageUtils
/* */ {
/* */ public static String message(String code, Object... args) {
/* 23 */ MessageSource messageSource = (MessageSource)SpringUtils.getBean(MessageSource.class);
/* 24 */ return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\MessageUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,172 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.text.Convert;
/* */ import java.io.IOException;
/* */ import javax.servlet.http.HttpServletRequest;
/* */ import javax.servlet.http.HttpServletResponse;
/* */ import javax.servlet.http.HttpSession;
/* */ import org.springframework.web.context.request.RequestAttributes;
/* */ import org.springframework.web.context.request.RequestContextHolder;
/* */ import org.springframework.web.context.request.ServletRequestAttributes;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class ServletUtils
/* */ {
/* 22 */ private static final String[] agent = new String[] { "Android", "iPhone", "iPod", "iPad", "Windows Phone", "MQQBrowser" };
/* */
/* */
/* */
/* */
/* */
/* */ public static String getParameter(String name) {
/* 29 */ return getRequest().getParameter(name);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static String getParameter(String name, String defaultValue) {
/* 37 */ return Convert.toStr(getRequest().getParameter(name), defaultValue);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static Integer getParameterToInt(String name) {
/* 45 */ return Convert.toInt(getRequest().getParameter(name));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static Integer getParameterToInt(String name, Integer defaultValue) {
/* 53 */ return Convert.toInt(getRequest().getParameter(name), defaultValue);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static HttpServletRequest getRequest() {
/* 61 */ return getRequestAttributes().getRequest();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static HttpServletResponse getResponse() {
/* 69 */ return getRequestAttributes().getResponse();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static HttpSession getSession() {
/* 77 */ return getRequest().getSession();
/* */ }
/* */
/* */
/* */ public static ServletRequestAttributes getRequestAttributes() {
/* 82 */ RequestAttributes attributes = RequestContextHolder.getRequestAttributes();
/* 83 */ return (ServletRequestAttributes)attributes;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String renderString(HttpServletResponse response, String string) {
/* */ try {
/* 97 */ response.setContentType("application/json");
/* 98 */ response.setCharacterEncoding("utf-8");
/* 99 */ response.getWriter().print(string);
/* */ }
/* 101 */ catch (IOException e) {
/* */
/* 103 */ e.printStackTrace();
/* */ }
/* 105 */ return null;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isAjaxRequest(HttpServletRequest request) {
/* 115 */ String accept = request.getHeader("accept");
/* 116 */ if (accept != null && accept.indexOf("application/json") != -1)
/* */ {
/* 118 */ return true;
/* */ }
/* */
/* 121 */ String xRequestedWith = request.getHeader("X-Requested-With");
/* 122 */ if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1)
/* */ {
/* 124 */ return true;
/* */ }
/* */
/* 127 */ String uri = request.getRequestURI();
/* 128 */ if (StringUtils.inStringIgnoreCase(uri, new String[] { ".json", ".xml" }))
/* */ {
/* 130 */ return true;
/* */ }
/* */
/* 133 */ String ajax = request.getParameter("__ajax");
/* 134 */ if (StringUtils.inStringIgnoreCase(ajax, new String[] { "json", "xml" }))
/* */ {
/* 136 */ return true;
/* */ }
/* 138 */ return false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean checkAgentIsMobile(String ua) {
/* 146 */ boolean flag = false;
/* 147 */ if (!ua.contains("Windows NT") || (ua.contains("Windows NT") && ua.contains("compatible; MSIE 9.0;")))
/* */ {
/* */
/* 150 */ if (!ua.contains("Windows NT") && !ua.contains("Macintosh"))
/* */ {
/* 152 */ for (String item : agent) {
/* */
/* 154 */ if (ua.contains(item)) {
/* */
/* 156 */ flag = true;
/* */ break;
/* */ }
/* */ }
/* */ }
/* */ }
/* 162 */ return flag;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\ServletUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,416 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import com.archive.common.utils.text.StrFormatter;
/* */ import java.util.Collection;
/* */ import java.util.Map;
/* */ import org.apache.commons.lang3.StringUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class StringUtils
/* */ extends StringUtils
/* */ {
/* */ private static final String NULLSTR = "";
/* */ private static final char SEPARATOR = '_';
/* */
/* */ public static <T> T nvl(T value, T defaultValue) {
/* 28 */ return (value != null) ? value : defaultValue;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isEmpty(Collection<?> coll) {
/* 39 */ return (isNull(coll) || coll.isEmpty());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNotEmpty(Collection<?> coll) {
/* 50 */ return !isEmpty(coll);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isEmpty(Object[] objects) {
/* 61 */ return (isNull(objects) || objects.length == 0);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNotEmpty(Object[] objects) {
/* 72 */ return !isEmpty(objects);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isEmpty(Map<?, ?> map) {
/* 83 */ return (isNull(map) || map.isEmpty());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNotEmpty(Map<?, ?> map) {
/* 94 */ return !isEmpty(map);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isEmpty(String str) {
/* 105 */ return (isNull(str) || "".equals(str.trim()));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNotEmpty(String str) {
/* 116 */ return !isEmpty(str);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNull(Object object) {
/* 127 */ return (object == null);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNotNull(Object object) {
/* 138 */ return !isNull(object);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isArray(Object object) {
/* 149 */ return (isNotNull(object) && object.getClass().isArray());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static String trim(String str) {
/* 157 */ return (str == null) ? "" : str.trim();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String substring(String str, int start) {
/* 169 */ if (str == null)
/* */ {
/* 171 */ return "";
/* */ }
/* */
/* 174 */ if (start < 0)
/* */ {
/* 176 */ start = str.length() + start;
/* */ }
/* */
/* 179 */ if (start < 0)
/* */ {
/* 181 */ start = 0;
/* */ }
/* 183 */ if (start > str.length())
/* */ {
/* 185 */ return "";
/* */ }
/* */
/* 188 */ return str.substring(start);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String substring(String str, int start, int end) {
/* 201 */ if (str == null)
/* */ {
/* 203 */ return "";
/* */ }
/* */
/* 206 */ if (end < 0)
/* */ {
/* 208 */ end = str.length() + end;
/* */ }
/* 210 */ if (start < 0)
/* */ {
/* 212 */ start = str.length() + start;
/* */ }
/* */
/* 215 */ if (end > str.length())
/* */ {
/* 217 */ end = str.length();
/* */ }
/* */
/* 220 */ if (start > end)
/* */ {
/* 222 */ return "";
/* */ }
/* */
/* 225 */ if (start < 0)
/* */ {
/* 227 */ start = 0;
/* */ }
/* 229 */ if (end < 0)
/* */ {
/* 231 */ end = 0;
/* */ }
/* */
/* 234 */ return str.substring(start, end);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String format(String template, Object... params) {
/* 252 */ if (isEmpty(params) || isEmpty(template))
/* */ {
/* 254 */ return template;
/* */ }
/* 256 */ return StrFormatter.format(template, params);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static String toUnderScoreCase(String str) {
/* 264 */ if (str == null)
/* */ {
/* 266 */ return null;
/* */ }
/* 268 */ StringBuilder sb = new StringBuilder();
/* */
/* 270 */ boolean preCharIsUpperCase = true;
/* */
/* 272 */ boolean curreCharIsUpperCase = true;
/* */
/* 274 */ boolean nexteCharIsUpperCase = true;
/* 275 */ for (int i = 0; i < str.length(); i++) {
/* */
/* 277 */ char c = str.charAt(i);
/* 278 */ if (i > 0) {
/* */
/* 280 */ preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1));
/* */ }
/* */ else {
/* */
/* 284 */ preCharIsUpperCase = false;
/* */ }
/* */
/* 287 */ curreCharIsUpperCase = Character.isUpperCase(c);
/* */
/* 289 */ if (i < str.length() - 1)
/* */ {
/* 291 */ nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1));
/* */ }
/* */
/* 294 */ if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase) {
/* */
/* 296 */ sb.append('_');
/* */ }
/* 298 */ else if (i != 0 && !preCharIsUpperCase && curreCharIsUpperCase) {
/* */
/* 300 */ sb.append('_');
/* */ }
/* 302 */ sb.append(Character.toLowerCase(c));
/* */ }
/* 304 */ return sb.toString();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean inStringIgnoreCase(String str, String... strs) {
/* 316 */ if (str != null && strs != null)
/* */ {
/* 318 */ for (String s : strs) {
/* */
/* 320 */ if (str.equalsIgnoreCase(trim(s)))
/* */ {
/* 322 */ return true;
/* */ }
/* */ }
/* */ }
/* 326 */ return false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String convertToCamelCase(String name) {
/* 337 */ StringBuilder result = new StringBuilder();
/* */
/* 339 */ if (name == null || name.isEmpty())
/* */ {
/* */
/* 342 */ return "";
/* */ }
/* 344 */ if (!name.contains("_"))
/* */ {
/* */
/* 347 */ return name.substring(0, 1).toUpperCase() + name.substring(1);
/* */ }
/* */
/* 350 */ String[] camels = name.split("_");
/* 351 */ for (String camel : camels) {
/* */
/* */
/* 354 */ if (!camel.isEmpty()) {
/* */
/* */
/* */
/* */
/* 359 */ result.append(camel.substring(0, 1).toUpperCase());
/* 360 */ result.append(camel.substring(1).toLowerCase());
/* */ }
/* 362 */ } return result.toString();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String toCamelCase(String s) {
/* 371 */ if (s == null)
/* */ {
/* 373 */ return null;
/* */ }
/* 375 */ if (s.indexOf('_') == -1)
/* */ {
/* 377 */ return s;
/* */ }
/* 379 */ s = s.toLowerCase();
/* 380 */ StringBuilder sb = new StringBuilder(s.length());
/* 381 */ boolean upperCase = false;
/* 382 */ for (int i = 0; i < s.length(); i++) {
/* */
/* 384 */ char c = s.charAt(i);
/* */
/* 386 */ if (c == '_') {
/* */
/* 388 */ upperCase = true;
/* */ }
/* 390 */ else if (upperCase) {
/* */
/* 392 */ sb.append(Character.toUpperCase(c));
/* 393 */ upperCase = false;
/* */ }
/* */ else {
/* */
/* 397 */ sb.append(c);
/* */ }
/* */ }
/* 400 */ return sb.toString();
/* */ }
/* */
/* */
/* */
/* */ public static <T> T cast(Object obj) {
/* 406 */ return (T)obj;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\StringUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,107 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import java.util.concurrent.CancellationException;
/* */ import java.util.concurrent.ExecutionException;
/* */ import java.util.concurrent.ExecutorService;
/* */ import java.util.concurrent.Future;
/* */ import java.util.concurrent.TimeUnit;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Threads
/* */ {
/* 18 */ private static final Logger logger = LoggerFactory.getLogger(com.archive.common.utils.Threads.class);
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void sleep(long milliseconds) {
/* */ try {
/* 27 */ Thread.sleep(milliseconds);
/* */ }
/* 29 */ catch (InterruptedException e) {
/* */ return;
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void shutdownAndAwaitTermination(ExecutorService pool) {
/* 44 */ if (pool != null && !pool.isShutdown()) {
/* */
/* 46 */ pool.shutdown();
/* */
/* */ try {
/* 49 */ if (!pool.awaitTermination(120L, TimeUnit.SECONDS))
/* */ {
/* 51 */ pool.shutdownNow();
/* 52 */ if (!pool.awaitTermination(120L, TimeUnit.SECONDS))
/* */ {
/* 54 */ logger.info("Pool did not terminate");
/* */ }
/* */ }
/* */
/* 58 */ } catch (InterruptedException ie) {
/* */
/* 60 */ pool.shutdownNow();
/* 61 */ Thread.currentThread().interrupt();
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static void printException(Runnable r, Throwable t) {
/* 71 */ if (t == null && r instanceof Future) {
/* */
/* */ try {
/* */
/* 75 */ Future<?> future = (Future)r;
/* 76 */ if (future.isDone())
/* */ {
/* 78 */ future.get();
/* */ }
/* */ }
/* 81 */ catch (CancellationException ce) {
/* */
/* 83 */ t = ce;
/* */ }
/* 85 */ catch (ExecutionException ee) {
/* */
/* 87 */ t = ee.getCause();
/* */ }
/* 89 */ catch (InterruptedException ie) {
/* */
/* 91 */ Thread.currentThread().interrupt();
/* */ }
/* */ }
/* 94 */ if (t != null)
/* */ {
/* 96 */ logger.error(t.getMessage(), t);
/* */ }
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\Threads.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,145 @@
/* */ package com.archive.common.utils
-INF.classes.com.archive.common.utils;
/* */
/* */ import com.archive.project.system.menu.domain.Menu;
/* */ import java.util.ArrayList;
/* */ import java.util.Iterator;
/* */ import java.util.List;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class TreeUtils
/* */ {
/* */ public static List<Menu> getChildPerms(List<Menu> list, int parentId) {
/* 24 */ List<Menu> returnList = new ArrayList<>();
/* 25 */ for (Iterator<Menu> iterator = list.iterator(); iterator.hasNext(); ) {
/* */
/* 27 */ Menu t = iterator.next();
/* */
/* 29 */ if (t.getParentId().longValue() == parentId) {
/* */
/* 31 */ recursionFn(list, t);
/* 32 */ returnList.add(t);
/* */ }
/* */ }
/* 35 */ return returnList;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private static void recursionFn(List<Menu> list, Menu t) {
/* 47 */ List<Menu> childList = getChildList(list, t);
/* 48 */ t.setChildren(childList);
/* 49 */ for (Menu tChild : childList) {
/* */
/* 51 */ if (hasChild(list, tChild))
/* */ {
/* 53 */ recursionFn(list, tChild);
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private static List<Menu> getChildList(List<Menu> list, Menu t) {
/* 64 */ List<Menu> tlist = new ArrayList<>();
/* 65 */ Iterator<Menu> it = list.iterator();
/* 66 */ while (it.hasNext()) {
/* */
/* 68 */ Menu n = it.next();
/* 69 */ if (n.getParentId().longValue() == t.getMenuId().longValue())
/* */ {
/* 71 */ tlist.add(n);
/* */ }
/* */ }
/* 74 */ return tlist;
/* */ }
/* */
/* 77 */ List<Menu> returnList = new ArrayList<>();
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Menu> getChildPerms(List<Menu> list, int typeId, String prefix) {
/* 88 */ if (list == null)
/* */ {
/* 90 */ return null;
/* */ }
/* 92 */ for (Iterator<Menu> iterator = list.iterator(); iterator.hasNext(); ) {
/* */
/* 94 */ Menu node = iterator.next();
/* */
/* 96 */ if (node.getParentId().longValue() == typeId)
/* */ {
/* 98 */ recursionFn(list, node, prefix);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* 105 */ return this.returnList;
/* */ }
/* */
/* */
/* */
/* */ private void recursionFn(List<Menu> list, Menu node, String p) {
/* 111 */ List<Menu> childList = getChildList(list, node);
/* 112 */ if (hasChild(list, node)) {
/* */
/* */
/* 115 */ this.returnList.add(node);
/* 116 */ Iterator<Menu> it = childList.iterator();
/* 117 */ while (it.hasNext())
/* */ {
/* 119 */ Menu n = it.next();
/* 120 */ n.setMenuName(p + n.getMenuName());
/* 121 */ recursionFn(list, n, p + p);
/* */ }
/* */
/* */ } else {
/* */
/* 126 */ this.returnList.add(node);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ private static boolean hasChild(List<Menu> list, Menu t) {
/* 135 */ return (getChildList(list, t).size() > 0);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\TreeUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,116 @@
/* */ package com.archive.common.utils.bean;
/* */
/* */ import java.lang.reflect.Method;
/* */ import java.util.ArrayList;
/* */ import java.util.List;
/* */ import java.util.regex.Matcher;
/* */ import java.util.regex.Pattern;
/* */ import org.springframework.beans.BeanUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class BeanUtils
/* */ extends BeanUtils
/* */ {
/* */ private static final int BEAN_METHOD_PROP_INDEX = 3;
/* 20 */ private static final Pattern GET_PATTERN = Pattern.compile("get(\\p{javaUpperCase}\\w*)");
/* */
/* */
/* 23 */ private static final Pattern SET_PATTERN = Pattern.compile("set(\\p{javaUpperCase}\\w*)");
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void copyBeanProp(Object dest, Object src) {
/* */ try {
/* 35 */ copyProperties(src, dest);
/* */ }
/* 37 */ catch (Exception e) {
/* */
/* 39 */ e.printStackTrace();
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static List<Method> getSetterMethods(Object obj) {
/* 52 */ List<Method> setterMethods = new ArrayList<>();
/* */
/* */
/* 55 */ Method[] methods = obj.getClass().getMethods();
/* */
/* */
/* */
/* 59 */ for (Method method : methods) {
/* */
/* 61 */ Matcher m = SET_PATTERN.matcher(method.getName());
/* 62 */ if (m.matches() && (method.getParameterTypes()).length == 1)
/* */ {
/* 64 */ setterMethods.add(method);
/* */ }
/* */ }
/* */
/* 68 */ return setterMethods;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static List<Method> getGetterMethods(Object obj) {
/* 81 */ List<Method> getterMethods = new ArrayList<>();
/* */
/* 83 */ Method[] methods = obj.getClass().getMethods();
/* */
/* 85 */ for (Method method : methods) {
/* */
/* 87 */ Matcher m = GET_PATTERN.matcher(method.getName());
/* 88 */ if (m.matches() && (method.getParameterTypes()).length == 0)
/* */ {
/* 90 */ getterMethods.add(method);
/* */ }
/* */ }
/* */
/* 94 */ return getterMethods;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isMethodPropEquals(String m1, String m2) {
/* 108 */ return m1.substring(3).equals(m2.substring(3));
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\bean\BeanUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,82 @@
/* */ package com.archive.common.utils.file;
/* */
/* */ import java.io.File;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class FileTypeUtils
/* */ {
/* */ public static String getFileType(File file) {
/* 23 */ if (null == file)
/* */ {
/* 25 */ return "";
/* */ }
/* 27 */ return getFileType(file.getName());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getFileType(String fileName) {
/* 40 */ int separatorIndex = fileName.lastIndexOf(".");
/* 41 */ if (separatorIndex < 0)
/* */ {
/* 43 */ return "";
/* */ }
/* 45 */ return fileName.substring(separatorIndex + 1).toLowerCase();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getFileExtendName(byte[] photoByte) {
/* 56 */ String strFileExtendName = "JPG";
/* 57 */ if (photoByte[0] == 71 && photoByte[1] == 73 && photoByte[2] == 70 && photoByte[3] == 56 && (photoByte[4] == 55 || photoByte[4] == 57) && photoByte[5] == 97) {
/* */
/* */
/* 60 */ strFileExtendName = "GIF";
/* */ }
/* 62 */ else if (photoByte[6] == 74 && photoByte[7] == 70 && photoByte[8] == 73 && photoByte[9] == 70) {
/* */
/* 64 */ strFileExtendName = "JPG";
/* */ }
/* 66 */ else if (photoByte[0] == 66 && photoByte[1] == 77) {
/* */
/* 68 */ strFileExtendName = "BMP";
/* */ }
/* 70 */ else if (photoByte[1] == 80 && photoByte[2] == 78 && photoByte[3] == 71) {
/* */
/* 72 */ strFileExtendName = "PNG";
/* */ }
/* 74 */ return strFileExtendName;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\file\FileTypeUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,241 @@
/* */ package com.archive.common.utils.file;
/* */
/* */ import com.archive.common.exception.file.FileNameLengthLimitExceededException;
/* */ import com.archive.common.exception.file.FileSizeLimitExceededException;
/* */ import com.archive.common.exception.file.InvalidExtensionException;
/* */ import com.archive.common.utils.DateUtils;
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.file.MimeTypeUtils;
/* */ import com.archive.common.utils.uuid.IdUtils;
/* */ import com.archive.framework.config.ArchiveConfig;
/* */ import java.io.File;
/* */ import java.io.IOException;
/* */ import org.apache.commons.io.FilenameUtils;
/* */ import org.springframework.web.multipart.MultipartFile;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class FileUploadUtils
/* */ {
/* */ public static final long DEFAULT_MAX_SIZE = 52428800L;
/* */ public static final int DEFAULT_FILE_NAME_LENGTH = 100;
/* 36 */ private static String defaultBaseDir = ArchiveConfig.getInstance().getProfile();
/* */
/* */
/* */ public static void setDefaultBaseDir(String defaultBaseDir) {
/* 40 */ com.archive.common.utils.file.FileUploadUtils.defaultBaseDir = defaultBaseDir;
/* */ }
/* */
/* */
/* */ public static String getDefaultBaseDir() {
/* 45 */ return defaultBaseDir;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static final String upload(MultipartFile file) throws IOException {
/* */ try {
/* 59 */ return upload(getDefaultBaseDir(), file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
/* */ }
/* 61 */ catch (Exception e) {
/* */
/* 63 */ throw new IOException(e.getMessage(), e);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static final String upload(String baseDir, MultipartFile file) throws IOException {
/* */ try {
/* 79 */ return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
/* */ }
/* 81 */ catch (Exception e) {
/* */
/* 83 */ throw new IOException(e.getMessage(), e);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension) throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException, InvalidExtensionException {
/* 103 */ int fileNamelength = file.getOriginalFilename().length();
/* 104 */ if (fileNamelength > 100)
/* */ {
/* 106 */ throw new FileNameLengthLimitExceededException(100);
/* */ }
/* */
/* 109 */ assertAllowed(file, allowedExtension);
/* */
/* 111 */ String fileName = extractFilename(file);
/* */
/* 113 */ File desc = getAbsoluteFile(baseDir, fileName);
/* 114 */ file.transferTo(desc);
/* 115 */ String pathFileName = getPathFileName(baseDir, fileName);
/* 116 */ return pathFileName;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static final String extractFilename(MultipartFile file) {
/* 124 */ String fileName = file.getOriginalFilename();
/* 125 */ String extension = getExtension(file);
/* 126 */ fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension;
/* 127 */ return fileName;
/* */ }
/* */
/* */
/* */ private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException {
/* 132 */ File desc = new File(uploadDir + File.separator + fileName);
/* */
/* 134 */ if (!desc.exists())
/* */ {
/* 136 */ if (!desc.getParentFile().exists())
/* */ {
/* 138 */ desc.getParentFile().mkdirs();
/* */ }
/* */ }
/* 141 */ return desc;
/* */ }
/* */
/* */
/* */
/* */
/* */ private static final String getPathFileName(String uploadDir, String fileName) throws IOException {
/* 148 */ String pathFileName = uploadDir + "/" + fileName;
/* 149 */ return pathFileName;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static final void assertAllowed(MultipartFile file, String[] allowedExtension) throws FileSizeLimitExceededException, InvalidExtensionException {
/* 163 */ long size = file.getSize();
/* 164 */ if (size > 52428800L)
/* */ {
/* 166 */ throw new FileSizeLimitExceededException(50L);
/* */ }
/* */
/* 169 */ String fileName = file.getOriginalFilename();
/* 170 */ String extension = getExtension(file);
/* 171 */ if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension)) {
/* */
/* 173 */ if (allowedExtension == MimeTypeUtils.IMAGE_EXTENSION)
/* */ {
/* 175 */ throw new InvalidExtensionException.InvalidImageExtensionException(allowedExtension, extension, fileName);
/* */ }
/* */
/* 178 */ if (allowedExtension == MimeTypeUtils.FLASH_EXTENSION)
/* */ {
/* 180 */ throw new InvalidExtensionException.InvalidFlashExtensionException(allowedExtension, extension, fileName);
/* */ }
/* */
/* 183 */ if (allowedExtension == MimeTypeUtils.MEDIA_EXTENSION)
/* */ {
/* 185 */ throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension, fileName);
/* */ }
/* */
/* 188 */ if (allowedExtension == MimeTypeUtils.VIDEO_EXTENSION)
/* */ {
/* 190 */ throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension, fileName);
/* */ }
/* */
/* */
/* */
/* 195 */ throw new InvalidExtensionException(allowedExtension, extension, fileName);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static final boolean isAllowedExtension(String extension, String[] allowedExtension) {
/* 210 */ for (String str : allowedExtension) {
/* */
/* 212 */ if (str.equalsIgnoreCase(extension))
/* */ {
/* 214 */ return true;
/* */ }
/* */ }
/* 217 */ return false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static final String getExtension(MultipartFile file) {
/* 228 */ String extension = FilenameUtils.getExtension(file.getOriginalFilename());
/* 229 */ if (StringUtils.isEmpty(extension))
/* */ {
/* 231 */ extension = MimeTypeUtils.getExtension(file.getContentType());
/* */ }
/* 233 */ return extension;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\file\FileUploadUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,212 @@
/* */ package com.archive.common.utils.file;
/* */
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.file.FileTypeUtils;
/* */ import com.archive.common.utils.file.MimeTypeUtils;
/* */ import java.io.File;
/* */ import java.io.FileInputStream;
/* */ import java.io.IOException;
/* */ import java.io.OutputStream;
/* */ import java.io.UnsupportedEncodingException;
/* */ import java.net.URLEncoder;
/* */ import java.nio.charset.StandardCharsets;
/* */ import javax.servlet.http.HttpServletRequest;
/* */ import javax.servlet.http.HttpServletResponse;
/* */ import org.apache.commons.io.FileUtils;
/* */ import org.apache.commons.lang3.ArrayUtils;
/* */
/* */
/* */
/* */ public class FileUtils
/* */ extends FileUtils
/* */ {
/* 23 */ public static String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+";
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void writeBytes(String filePath, OutputStream os) throws IOException {
/* 34 */ FileInputStream fis = null;
/* */
/* */ try {
/* 37 */ File file = new File(filePath);
/* 38 */ if (!file.exists())
/* */ {
/* 40 */ if (!(new File(file.getParent())).exists()) {
/* 41 */ (new File(file.getParent())).mkdirs();
/* */ }
/* */ }
/* */
/* 45 */ fis = new FileInputStream(file);
/* 46 */ byte[] b = new byte[1024];
/* */ int length;
/* 48 */ while ((length = fis.read(b)) > 0)
/* */ {
/* 50 */ os.write(b, 0, length);
/* */ }
/* */ }
/* 53 */ catch (IOException e) {
/* */
/* 55 */ throw e;
/* */ }
/* */ finally {
/* */
/* 59 */ if (os != null) {
/* */
/* */ try {
/* */
/* 63 */ os.close();
/* */ }
/* 65 */ catch (IOException e1) {
/* */
/* 67 */ e1.printStackTrace();
/* */ }
/* */ }
/* 70 */ if (fis != null) {
/* */
/* */ try {
/* */
/* 74 */ fis.close();
/* */ }
/* 76 */ catch (IOException e1) {
/* */
/* 78 */ e1.printStackTrace();
/* */ }
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean deleteFile(String filePath) {
/* 92 */ boolean flag = false;
/* 93 */ File file = new File(filePath);
/* */
/* 95 */ if (file.isFile() && file.exists()) {
/* */
/* 97 */ file.delete();
/* 98 */ flag = true;
/* */ }
/* 100 */ return flag;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isValidFilename(String filename) {
/* 111 */ return filename.matches(FILENAME_PATTERN);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean checkAllowDownload(String resource) {
/* 123 */ if (StringUtils.contains(resource, ".."))
/* */ {
/* 125 */ return false;
/* */ }
/* */
/* */
/* 129 */ if (ArrayUtils.contains((Object[])MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION, FileTypeUtils.getFileType(resource)))
/* */ {
/* 131 */ return true;
/* */ }
/* */
/* */
/* 135 */ return false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String setFileDownloadHeader(HttpServletRequest request, String fileName) throws UnsupportedEncodingException {
/* 147 */ String agent = request.getHeader("USER-AGENT");
/* 148 */ String filename = fileName;
/* 149 */ if (agent.contains("MSIE")) {
/* */
/* */
/* 152 */ filename = URLEncoder.encode(filename, "utf-8");
/* 153 */ filename = filename.replace("+", " ");
/* */ }
/* 155 */ else if (agent.contains("Firefox")) {
/* */
/* */
/* 158 */ filename = new String(fileName.getBytes(), "ISO8859-1");
/* */ }
/* 160 */ else if (agent.contains("Chrome")) {
/* */
/* */
/* 163 */ filename = URLEncoder.encode(filename, "utf-8");
/* */
/* */ }
/* */ else {
/* */
/* 168 */ filename = URLEncoder.encode(filename, "utf-8");
/* */ }
/* 170 */ return filename;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void setAttachmentResponseHeader(HttpServletResponse response, String realFileName) throws UnsupportedEncodingException {
/* 182 */ String percentEncodedFileName = percentEncode(realFileName);
/* */
/* 184 */ StringBuilder contentDispositionValue = new StringBuilder();
/* 185 */ contentDispositionValue.append("attachment; filename=")
/* 186 */ .append(percentEncodedFileName)
/* 187 */ .append(";")
/* 188 */ .append("filename*=")
/* 189 */ .append("utf-8''")
/* 190 */ .append(percentEncodedFileName);
/* */
/* 192 */ response.setHeader("Content-disposition", contentDispositionValue.toString());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String percentEncode(String s) throws UnsupportedEncodingException {
/* 203 */ String encode = URLEncoder.encode(s, StandardCharsets.UTF_8.toString());
/* 204 */ return encode.replaceAll("\\+", "%20");
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\file\FileUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,106 @@
/* */ package com.archive.common.utils.file;
/* */
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.framework.config.ArchiveConfig;
/* */ import java.io.ByteArrayInputStream;
/* */ import java.io.ByteArrayOutputStream;
/* */ import java.io.FileInputStream;
/* */ import java.io.InputStream;
/* */ import java.net.URL;
/* */ import java.net.URLConnection;
/* */ import java.util.Arrays;
/* */ import org.apache.poi.util.IOUtils;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class ImageUtils
/* */ {
/* 24 */ private static final Logger log = LoggerFactory.getLogger(com.archive.common.utils.file.ImageUtils.class);
/* */
/* */
/* */ public static byte[] getImage(String imagePath) {
/* 28 */ InputStream is = getFile(imagePath);
/* */
/* */ try {
/* 31 */ return IOUtils.toByteArray(is);
/* */ }
/* 33 */ catch (Exception e) {
/* */
/* 35 */ log.error("图片加载异常 {}", e);
/* 36 */ return null;
/* */ }
/* */ finally {
/* */
/* 40 */ IOUtils.closeQuietly(is);
/* */ }
/* */ }
/* */
/* */
/* */
/* */ public static InputStream getFile(String imagePath) {
/* */ try {
/* 48 */ byte[] result = readFile(imagePath);
/* 49 */ result = Arrays.copyOf(result, result.length);
/* 50 */ return new ByteArrayInputStream(result);
/* */ }
/* 52 */ catch (Exception e) {
/* */
/* 54 */ log.error("获取图片异常 {}", e);
/* */
/* 56 */ return null;
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static byte[] readFile(String url) {
/* 67 */ InputStream in = null;
/* 68 */ ByteArrayOutputStream baos = null;
/* */
/* */ try {
/* 71 */ if (url.startsWith("http")) {
/* */
/* */
/* 74 */ URL urlObj = new URL(url);
/* 75 */ URLConnection urlConnection = urlObj.openConnection();
/* 76 */ urlConnection.setConnectTimeout(30000);
/* 77 */ urlConnection.setReadTimeout(60000);
/* 78 */ urlConnection.setDoInput(true);
/* 79 */ in = urlConnection.getInputStream();
/* */
/* */ }
/* */ else {
/* */
/* 84 */ String localPath = ArchiveConfig.getInstance().getProfile();
/* 85 */ String downloadPath = localPath + StringUtils.substringAfter(url, "/profile");
/* 86 */ in = new FileInputStream(downloadPath);
/* */ }
/* 88 */ return IOUtils.toByteArray(in);
/* */ }
/* 90 */ catch (Exception e) {
/* */
/* 92 */ log.error("获取文件路径异常 {}", e);
/* 93 */ return null;
/* */ }
/* */ finally {
/* */
/* 97 */ IOUtils.closeQuietly(baos);
/* */ }
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\file\ImageUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,64 @@
/* */ package com.archive.common.utils.file;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class MimeTypeUtils
/* */ {
/* */ public static final String IMAGE_PNG = "image/png";
/* */ public static final String IMAGE_JPG = "image/jpg";
/* */ public static final String IMAGE_JPEG = "image/jpeg";
/* */ public static final String IMAGE_BMP = "image/bmp";
/* */ public static final String IMAGE_GIF = "image/gif";
/* 20 */ public static final String[] IMAGE_EXTENSION = new String[] { "bmp", "gif", "jpg", "jpeg", "png" };
/* */
/* 22 */ public static final String[] FLASH_EXTENSION = new String[] { "swf", "flv" };
/* */
/* 24 */ public static final String[] MEDIA_EXTENSION = new String[] { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg", "asf", "rm", "rmvb" };
/* */
/* */
/* 27 */ public static final String[] VIDEO_EXTENSION = new String[] { "mp4", "avi", "rmvb" };
/* */
/* 29 */ public static final String[] DEFAULT_ALLOWED_EXTENSION = new String[] { "bmp", "gif", "jpg", "jpeg", "png", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", "rar", "zip", "gz", "bz2", "mp4", "avi", "rmvb", "pdf" };
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getExtension(String prefix) {
/* 43 */ switch (prefix) {
/* */
/* */ case "image/png":
/* 46 */ return "png";
/* */ case "image/jpg":
/* 48 */ return "jpg";
/* */ case "image/jpeg":
/* 50 */ return "jpeg";
/* */ case "image/bmp":
/* 52 */ return "bmp";
/* */ case "image/gif":
/* 54 */ return "gif";
/* */ }
/* 56 */ return "";
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\file\MimeTypeUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,161 @@
/* */ package com.archive.common.utils.html;
/* */
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.html.HTMLFilter;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class EscapeUtil
/* */ {
/* */ public static final String RE_HTML_MARK = "(<[^<]*?>)|(<[\\s]*?/[^<]*?>)|(<[^<]*?/[\\s]*?>)";
/* 14 */ private static final char[][] TEXT = new char[64][];
/* */
/* */
/* */ static {
/* 18 */ for (int i = 0; i < 64; i++) {
/* */
/* 20 */ (new char[1])[0] = (char)i; TEXT[i] = new char[1];
/* */ }
/* */
/* */
/* 24 */ TEXT[39] = "&#039;".toCharArray();
/* 25 */ TEXT[34] = "&#34;".toCharArray();
/* 26 */ TEXT[38] = "&#38;".toCharArray();
/* 27 */ TEXT[60] = "&#60;".toCharArray();
/* 28 */ TEXT[62] = "&#62;".toCharArray();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String escape(String text) {
/* 39 */ return encode(text);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String unescape(String content) {
/* 50 */ return decode(content);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String clean(String content) {
/* 61 */ return (new HTMLFilter()).filter(content);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private static String encode(String text) {
/* */ int len;
/* 73 */ if (text == null || (len = text.length()) == 0)
/* */ {
/* 75 */ return "";
/* */ }
/* 77 */ StringBuilder buffer = new StringBuilder(len + (len >> 2));
/* */
/* 79 */ for (int i = 0; i < len; i++) {
/* */
/* 81 */ char c = text.charAt(i);
/* 82 */ if (c < '@') {
/* */
/* 84 */ buffer.append(TEXT[c]);
/* */ }
/* */ else {
/* */
/* 88 */ buffer.append(c);
/* */ }
/* */ }
/* 91 */ return buffer.toString();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String decode(String content) {
/* 102 */ if (StringUtils.isEmpty(content))
/* */ {
/* 104 */ return content;
/* */ }
/* */
/* 107 */ StringBuilder tmp = new StringBuilder(content.length());
/* 108 */ int lastPos = 0, pos = 0;
/* */
/* 110 */ while (lastPos < content.length()) {
/* */
/* 112 */ pos = content.indexOf("%", lastPos);
/* 113 */ if (pos == lastPos) {
/* */
/* 115 */ if (content.charAt(pos + 1) == 'u') {
/* */
/* 117 */ char c = (char)Integer.parseInt(content.substring(pos + 2, pos + 6), 16);
/* 118 */ tmp.append(c);
/* 119 */ lastPos = pos + 6;
/* */
/* */ continue;
/* */ }
/* 123 */ char ch = (char)Integer.parseInt(content.substring(pos + 1, pos + 3), 16);
/* 124 */ tmp.append(ch);
/* 125 */ lastPos = pos + 3;
/* */
/* */ continue;
/* */ }
/* */
/* 130 */ if (pos == -1) {
/* */
/* 132 */ tmp.append(content.substring(lastPos));
/* 133 */ lastPos = content.length();
/* */
/* */ continue;
/* */ }
/* 137 */ tmp.append(content.substring(lastPos, pos));
/* 138 */ lastPos = pos;
/* */ }
/* */
/* */
/* 142 */ return tmp.toString();
/* */ }
/* */
/* */
/* */ public static void main(String[] args) {
/* 147 */ String html = "<script>alert(1);</script>";
/* */
/* */
/* */
/* 151 */ System.out.println(clean(html));
/* 152 */ System.out.println(escape(html));
/* 153 */ System.out.println(unescape(html));
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\html\EscapeUtil.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,576 @@
/* */ package com.archive.common.utils.html;
/* */
/* */ import java.util.ArrayList;
/* */ import java.util.Collections;
/* */ import java.util.HashMap;
/* */ import java.util.List;
/* */ import java.util.Map;
/* */ import java.util.concurrent.ConcurrentHashMap;
/* */ import java.util.concurrent.ConcurrentMap;
/* */ import java.util.regex.Matcher;
/* */ import java.util.regex.Pattern;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public final class HTMLFilter
/* */ {
/* */ private static final int REGEX_FLAGS_SI = 34;
/* 24 */ private static final Pattern P_COMMENTS = Pattern.compile("<!--(.*?)-->", 32);
/* 25 */ private static final Pattern P_COMMENT = Pattern.compile("^!--(.*)--$", 34);
/* 26 */ private static final Pattern P_TAGS = Pattern.compile("<(.*?)>", 32);
/* 27 */ private static final Pattern P_END_TAG = Pattern.compile("^/([a-z0-9]+)", 34);
/* 28 */ private static final Pattern P_START_TAG = Pattern.compile("^([a-z0-9]+)(.*?)(/?)$", 34);
/* 29 */ private static final Pattern P_QUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)=([\"'])(.*?)\\2", 34);
/* 30 */ private static final Pattern P_UNQUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)(=)([^\"\\s']+)", 34);
/* 31 */ private static final Pattern P_PROTOCOL = Pattern.compile("^([^:]+):", 34);
/* 32 */ private static final Pattern P_ENTITY = Pattern.compile("&#(\\d+);?");
/* 33 */ private static final Pattern P_ENTITY_UNICODE = Pattern.compile("&#x([0-9a-f]+);?");
/* 34 */ private static final Pattern P_ENCODE = Pattern.compile("%([0-9a-f]{2});?");
/* 35 */ private static final Pattern P_VALID_ENTITIES = Pattern.compile("&([^&;]*)(?=(;|&|$))");
/* 36 */ private static final Pattern P_VALID_QUOTES = Pattern.compile("(>|^)([^<]+?)(<|$)", 32);
/* 37 */ private static final Pattern P_END_ARROW = Pattern.compile("^>");
/* 38 */ private static final Pattern P_BODY_TO_END = Pattern.compile("<([^>]*?)(?=<|$)");
/* 39 */ private static final Pattern P_XML_CONTENT = Pattern.compile("(^|>)([^<]*?)(?=>)");
/* 40 */ private static final Pattern P_STRAY_LEFT_ARROW = Pattern.compile("<([^>]*?)(?=<|$)");
/* 41 */ private static final Pattern P_STRAY_RIGHT_ARROW = Pattern.compile("(^|>)([^<]*?)(?=>)");
/* 42 */ private static final Pattern P_AMP = Pattern.compile("&");
/* 43 */ private static final Pattern P_QUOTE = Pattern.compile("\"");
/* 44 */ private static final Pattern P_LEFT_ARROW = Pattern.compile("<");
/* 45 */ private static final Pattern P_RIGHT_ARROW = Pattern.compile(">");
/* 46 */ private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>");
/* */
/* */
/* 49 */ private static final ConcurrentMap<String, Pattern> P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap<>();
/* 50 */ private static final ConcurrentMap<String, Pattern> P_REMOVE_SELF_BLANKS = new ConcurrentHashMap<>();
/* */
/* */
/* */
/* */
/* */ private final Map<String, List<String>> vAllowed;
/* */
/* */
/* */
/* 59 */ private final Map<String, Integer> vTagCounts = new HashMap<>();
/* */
/* */
/* */
/* */ private final String[] vSelfClosingTags;
/* */
/* */
/* */
/* */ private final String[] vNeedClosingTags;
/* */
/* */
/* */
/* */ private final String[] vDisallowed;
/* */
/* */
/* */
/* */ private final String[] vProtocolAtts;
/* */
/* */
/* */
/* */ private final String[] vAllowedProtocols;
/* */
/* */
/* */
/* */ private final String[] vRemoveBlanks;
/* */
/* */
/* */
/* */ private final String[] vAllowedEntities;
/* */
/* */
/* */
/* */ private final boolean stripComment;
/* */
/* */
/* */
/* */ private final boolean encodeQuotes;
/* */
/* */
/* */
/* */ private final boolean alwaysMakeTags;
/* */
/* */
/* */
/* */
/* */ public HTMLFilter() {
/* 105 */ this.vAllowed = new HashMap<>();
/* */
/* 107 */ ArrayList<String> a_atts = new ArrayList<>();
/* 108 */ a_atts.add("href");
/* 109 */ a_atts.add("target");
/* 110 */ this.vAllowed.put("a", a_atts);
/* */
/* 112 */ ArrayList<String> img_atts = new ArrayList<>();
/* 113 */ img_atts.add("src");
/* 114 */ img_atts.add("width");
/* 115 */ img_atts.add("height");
/* 116 */ img_atts.add("alt");
/* 117 */ this.vAllowed.put("img", img_atts);
/* */
/* 119 */ ArrayList<String> no_atts = new ArrayList<>();
/* 120 */ this.vAllowed.put("b", no_atts);
/* 121 */ this.vAllowed.put("strong", no_atts);
/* 122 */ this.vAllowed.put("i", no_atts);
/* 123 */ this.vAllowed.put("em", no_atts);
/* */
/* 125 */ this.vSelfClosingTags = new String[] { "img" };
/* 126 */ this.vNeedClosingTags = new String[] { "a", "b", "strong", "i", "em" };
/* 127 */ this.vDisallowed = new String[0];
/* 128 */ this.vAllowedProtocols = new String[] { "http", "mailto", "https" };
/* 129 */ this.vProtocolAtts = new String[] { "src", "href" };
/* 130 */ this.vRemoveBlanks = new String[] { "a", "b", "strong", "i", "em" };
/* 131 */ this.vAllowedEntities = new String[] { "amp", "gt", "lt", "quot" };
/* 132 */ this.stripComment = true;
/* 133 */ this.encodeQuotes = true;
/* 134 */ this.alwaysMakeTags = false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public HTMLFilter(Map<String, Object> conf) {
/* 146 */ assert conf.containsKey("vAllowed") : "configuration requires vAllowed";
/* 147 */ assert conf.containsKey("vSelfClosingTags") : "configuration requires vSelfClosingTags";
/* 148 */ assert conf.containsKey("vNeedClosingTags") : "configuration requires vNeedClosingTags";
/* 149 */ assert conf.containsKey("vDisallowed") : "configuration requires vDisallowed";
/* 150 */ assert conf.containsKey("vAllowedProtocols") : "configuration requires vAllowedProtocols";
/* 151 */ assert conf.containsKey("vProtocolAtts") : "configuration requires vProtocolAtts";
/* 152 */ assert conf.containsKey("vRemoveBlanks") : "configuration requires vRemoveBlanks";
/* 153 */ assert conf.containsKey("vAllowedEntities") : "configuration requires vAllowedEntities";
/* */
/* 155 */ this.vAllowed = Collections.unmodifiableMap((HashMap)conf.get("vAllowed"));
/* 156 */ this.vSelfClosingTags = (String[])conf.get("vSelfClosingTags");
/* 157 */ this.vNeedClosingTags = (String[])conf.get("vNeedClosingTags");
/* 158 */ this.vDisallowed = (String[])conf.get("vDisallowed");
/* 159 */ this.vAllowedProtocols = (String[])conf.get("vAllowedProtocols");
/* 160 */ this.vProtocolAtts = (String[])conf.get("vProtocolAtts");
/* 161 */ this.vRemoveBlanks = (String[])conf.get("vRemoveBlanks");
/* 162 */ this.vAllowedEntities = (String[])conf.get("vAllowedEntities");
/* 163 */ this.stripComment = conf.containsKey("stripComment") ? ((Boolean)conf.get("stripComment")).booleanValue() : true;
/* 164 */ this.encodeQuotes = conf.containsKey("encodeQuotes") ? ((Boolean)conf.get("encodeQuotes")).booleanValue() : true;
/* 165 */ this.alwaysMakeTags = conf.containsKey("alwaysMakeTags") ? ((Boolean)conf.get("alwaysMakeTags")).booleanValue() : true;
/* */ }
/* */
/* */
/* */ private void reset() {
/* 170 */ this.vTagCounts.clear();
/* */ }
/* */
/* */
/* */
/* */
/* */ public static String chr(int decimal) {
/* 177 */ return String.valueOf((char)decimal);
/* */ }
/* */
/* */
/* */ public static String htmlSpecialChars(String s) {
/* 182 */ String result = s;
/* 183 */ result = regexReplace(P_AMP, "&amp;", result);
/* 184 */ result = regexReplace(P_QUOTE, "&quot;", result);
/* 185 */ result = regexReplace(P_LEFT_ARROW, "&lt;", result);
/* 186 */ result = regexReplace(P_RIGHT_ARROW, "&gt;", result);
/* 187 */ return result;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public String filter(String input) {
/* 200 */ reset();
/* 201 */ String s = input;
/* */
/* 203 */ s = escapeComments(s);
/* */
/* 205 */ s = balanceHTML(s);
/* */
/* 207 */ s = checkTags(s);
/* */
/* 209 */ s = processRemoveBlanks(s);
/* */
/* */
/* */
/* 213 */ return s;
/* */ }
/* */
/* */
/* */ public boolean isAlwaysMakeTags() {
/* 218 */ return this.alwaysMakeTags;
/* */ }
/* */
/* */
/* */ public boolean isStripComments() {
/* 223 */ return this.stripComment;
/* */ }
/* */
/* */
/* */ private String escapeComments(String s) {
/* 228 */ Matcher m = P_COMMENTS.matcher(s);
/* 229 */ StringBuffer buf = new StringBuffer();
/* 230 */ if (m.find()) {
/* */
/* 232 */ String match = m.group(1);
/* 233 */ m.appendReplacement(buf, Matcher.quoteReplacement("<!--" + htmlSpecialChars(match) + "-->"));
/* */ }
/* 235 */ m.appendTail(buf);
/* */
/* 237 */ return buf.toString();
/* */ }
/* */
/* */
/* */ private String balanceHTML(String s) {
/* 242 */ if (this.alwaysMakeTags) {
/* */
/* */
/* */
/* */
/* 247 */ s = regexReplace(P_END_ARROW, "", s);
/* */
/* 249 */ s = regexReplace(P_BODY_TO_END, "<$1>", s);
/* 250 */ s = regexReplace(P_XML_CONTENT, "$1<$2", s);
/* */
/* */
/* */ }
/* */ else {
/* */
/* */
/* */
/* 258 */ s = regexReplace(P_STRAY_LEFT_ARROW, "&lt;$1", s);
/* 259 */ s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2&gt;<", s);
/* */
/* */
/* */
/* */
/* */
/* */
/* 266 */ s = regexReplace(P_BOTH_ARROWS, "", s);
/* */ }
/* */
/* 269 */ return s;
/* */ }
/* */
/* */
/* */ private String checkTags(String s) {
/* 274 */ Matcher m = P_TAGS.matcher(s);
/* */
/* 276 */ StringBuffer buf = new StringBuffer();
/* 277 */ while (m.find()) {
/* */
/* 279 */ String replaceStr = m.group(1);
/* 280 */ replaceStr = processTag(replaceStr);
/* 281 */ m.appendReplacement(buf, Matcher.quoteReplacement(replaceStr));
/* */ }
/* 283 */ m.appendTail(buf);
/* */
/* */
/* */
/* 287 */ StringBuilder sBuilder = new StringBuilder(buf.toString());
/* 288 */ for (String key : this.vTagCounts.keySet()) {
/* */
/* 290 */ for (int ii = 0; ii < ((Integer)this.vTagCounts.get(key)).intValue(); ii++)
/* */ {
/* 292 */ sBuilder.append("</").append(key).append(">");
/* */ }
/* */ }
/* 295 */ s = sBuilder.toString();
/* */
/* 297 */ return s;
/* */ }
/* */
/* */
/* */ private String processRemoveBlanks(String s) {
/* 302 */ String result = s;
/* 303 */ for (String tag : this.vRemoveBlanks) {
/* */
/* 305 */ if (!P_REMOVE_PAIR_BLANKS.containsKey(tag))
/* */ {
/* 307 */ P_REMOVE_PAIR_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?></" + tag + ">"));
/* */ }
/* 309 */ result = regexReplace(P_REMOVE_PAIR_BLANKS.get(tag), "", result);
/* 310 */ if (!P_REMOVE_SELF_BLANKS.containsKey(tag))
/* */ {
/* 312 */ P_REMOVE_SELF_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?/>"));
/* */ }
/* 314 */ result = regexReplace(P_REMOVE_SELF_BLANKS.get(tag), "", result);
/* */ }
/* */
/* 317 */ return result;
/* */ }
/* */
/* */
/* */ private static String regexReplace(Pattern regex_pattern, String replacement, String s) {
/* 322 */ Matcher m = regex_pattern.matcher(s);
/* 323 */ return m.replaceAll(replacement);
/* */ }
/* */
/* */
/* */
/* */ private String processTag(String s) {
/* 329 */ Matcher m = P_END_TAG.matcher(s);
/* 330 */ if (m.find()) {
/* */
/* 332 */ String name = m.group(1).toLowerCase();
/* 333 */ if (allowed(name))
/* */ {
/* 335 */ if (false == inArray(name, this.vSelfClosingTags))
/* */ {
/* 337 */ if (this.vTagCounts.containsKey(name)) {
/* */
/* 339 */ this.vTagCounts.put(name, Integer.valueOf(((Integer)this.vTagCounts.get(name)).intValue() - 1));
/* 340 */ return "</" + name + ">";
/* */ }
/* */ }
/* */ }
/* */ }
/* */
/* */
/* 347 */ m = P_START_TAG.matcher(s);
/* 348 */ if (m.find()) {
/* */
/* 350 */ String name = m.group(1).toLowerCase();
/* 351 */ String body = m.group(2);
/* 352 */ String ending = m.group(3);
/* */
/* */
/* 355 */ if (allowed(name)) {
/* */
/* 357 */ StringBuilder params = new StringBuilder();
/* */
/* 359 */ Matcher m2 = P_QUOTED_ATTRIBUTES.matcher(body);
/* 360 */ Matcher m3 = P_UNQUOTED_ATTRIBUTES.matcher(body);
/* 361 */ List<String> paramNames = new ArrayList<>();
/* 362 */ List<String> paramValues = new ArrayList<>();
/* 363 */ while (m2.find()) {
/* */
/* 365 */ paramNames.add(m2.group(1));
/* 366 */ paramValues.add(m2.group(3));
/* */ }
/* 368 */ while (m3.find()) {
/* */
/* 370 */ paramNames.add(m3.group(1));
/* 371 */ paramValues.add(m3.group(3));
/* */ }
/* */
/* */
/* 375 */ for (int ii = 0; ii < paramNames.size(); ii++) {
/* */
/* 377 */ String paramName = ((String)paramNames.get(ii)).toLowerCase();
/* 378 */ String paramValue = paramValues.get(ii);
/* */
/* */
/* */
/* */
/* */
/* 384 */ if (allowedAttribute(name, paramName)) {
/* */
/* 386 */ if (inArray(paramName, this.vProtocolAtts))
/* */ {
/* 388 */ paramValue = processParamProtocol(paramValue);
/* */ }
/* 390 */ params.append(' ').append(paramName).append("=\"").append(paramValue).append("\"");
/* */ }
/* */ }
/* */
/* 394 */ if (inArray(name, this.vSelfClosingTags))
/* */ {
/* 396 */ ending = " /";
/* */ }
/* */
/* 399 */ if (inArray(name, this.vNeedClosingTags))
/* */ {
/* 401 */ ending = "";
/* */ }
/* */
/* 404 */ if (ending == null || ending.length() < 1) {
/* */
/* 406 */ if (this.vTagCounts.containsKey(name))
/* */ {
/* 408 */ this.vTagCounts.put(name, Integer.valueOf(((Integer)this.vTagCounts.get(name)).intValue() + 1));
/* */ }
/* */ else
/* */ {
/* 412 */ this.vTagCounts.put(name, Integer.valueOf(1));
/* */ }
/* */
/* */ } else {
/* */
/* 417 */ ending = " /";
/* */ }
/* 419 */ return "<" + name + params + ending + ">";
/* */ }
/* */
/* */
/* 423 */ return "";
/* */ }
/* */
/* */
/* */
/* 428 */ m = P_COMMENT.matcher(s);
/* 429 */ if (!this.stripComment && m.find())
/* */ {
/* 431 */ return "<" + m.group() + ">";
/* */ }
/* */
/* 434 */ return "";
/* */ }
/* */
/* */
/* */ private String processParamProtocol(String s) {
/* 439 */ s = decodeEntities(s);
/* 440 */ Matcher m = P_PROTOCOL.matcher(s);
/* 441 */ if (m.find()) {
/* */
/* 443 */ String protocol = m.group(1);
/* 444 */ if (!inArray(protocol, this.vAllowedProtocols)) {
/* */
/* */
/* 447 */ s = "#" + s.substring(protocol.length() + 1);
/* 448 */ if (s.startsWith("#//"))
/* */ {
/* 450 */ s = "#" + s.substring(3);
/* */ }
/* */ }
/* */ }
/* */
/* 455 */ return s;
/* */ }
/* */
/* */
/* */ private String decodeEntities(String s) {
/* 460 */ StringBuffer buf = new StringBuffer();
/* */
/* 462 */ Matcher m = P_ENTITY.matcher(s);
/* 463 */ while (m.find()) {
/* */
/* 465 */ String match = m.group(1);
/* 466 */ int decimal = Integer.decode(match).intValue();
/* 467 */ m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
/* */ }
/* 469 */ m.appendTail(buf);
/* 470 */ s = buf.toString();
/* */
/* 472 */ buf = new StringBuffer();
/* 473 */ m = P_ENTITY_UNICODE.matcher(s);
/* 474 */ while (m.find()) {
/* */
/* 476 */ String match = m.group(1);
/* 477 */ int decimal = Integer.valueOf(match, 16).intValue();
/* 478 */ m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
/* */ }
/* 480 */ m.appendTail(buf);
/* 481 */ s = buf.toString();
/* */
/* 483 */ buf = new StringBuffer();
/* 484 */ m = P_ENCODE.matcher(s);
/* 485 */ while (m.find()) {
/* */
/* 487 */ String match = m.group(1);
/* 488 */ int decimal = Integer.valueOf(match, 16).intValue();
/* 489 */ m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
/* */ }
/* 491 */ m.appendTail(buf);
/* 492 */ s = buf.toString();
/* */
/* 494 */ s = validateEntities(s);
/* 495 */ return s;
/* */ }
/* */
/* */
/* */ private String validateEntities(String s) {
/* 500 */ StringBuffer buf = new StringBuffer();
/* */
/* */
/* 503 */ Matcher m = P_VALID_ENTITIES.matcher(s);
/* 504 */ while (m.find()) {
/* */
/* 506 */ String one = m.group(1);
/* 507 */ String two = m.group(2);
/* 508 */ m.appendReplacement(buf, Matcher.quoteReplacement(checkEntity(one, two)));
/* */ }
/* 510 */ m.appendTail(buf);
/* */
/* 512 */ return encodeQuotes(buf.toString());
/* */ }
/* */
/* */
/* */ private String encodeQuotes(String s) {
/* 517 */ if (this.encodeQuotes) {
/* */
/* 519 */ StringBuffer buf = new StringBuffer();
/* 520 */ Matcher m = P_VALID_QUOTES.matcher(s);
/* 521 */ while (m.find()) {
/* */
/* 523 */ String one = m.group(1);
/* 524 */ String two = m.group(2);
/* 525 */ String three = m.group(3);
/* */
/* 527 */ m.appendReplacement(buf, Matcher.quoteReplacement(one + two + three));
/* */ }
/* 529 */ m.appendTail(buf);
/* 530 */ return buf.toString();
/* */ }
/* */
/* */
/* 534 */ return s;
/* */ }
/* */
/* */
/* */
/* */
/* */ private String checkEntity(String preamble, String term) {
/* 541 */ return (";".equals(term) && isValidEntity(preamble)) ? ('&' + preamble) : ("&amp;" + preamble);
/* */ }
/* */
/* */
/* */ private boolean isValidEntity(String entity) {
/* 546 */ return inArray(entity, this.vAllowedEntities);
/* */ }
/* */
/* */
/* */ private static boolean inArray(String s, String[] array) {
/* 551 */ for (String item : array) {
/* */
/* 553 */ if (item != null && item.equals(s))
/* */ {
/* 555 */ return true;
/* */ }
/* */ }
/* 558 */ return false;
/* */ }
/* */
/* */
/* */ private boolean allowed(String name) {
/* 563 */ return ((this.vAllowed.isEmpty() || this.vAllowed.containsKey(name)) && !inArray(name, this.vDisallowed));
/* */ }
/* */
/* */
/* */ private boolean allowedAttribute(String name, String paramName) {
/* 568 */ return (allowed(name) && (this.vAllowed.isEmpty() || ((List)this.vAllowed.get(name)).contains(paramName)));
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\html\HTMLFilter.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,7 @@
package com.archive.common.utils.http;
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\http\HttpUtils$1.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,267 @@
/* */ package com.archive.common.utils.http;
/* */
/* */ import com.archive.common.utils.http.HttpUtils;
/* */ import javax.net.ssl.HostnameVerifier;
/* */ import javax.net.ssl.SSLSession;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ class TrustAnyHostnameVerifier
/* */ implements HostnameVerifier
/* */ {
/* */ private TrustAnyHostnameVerifier() {}
/* */
/* */ public boolean verify(String hostname, SSLSession session) {
/* 259 */ return true;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\http\HttpUtils$TrustAnyHostnameVerifier.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,258 @@
/* */ package com.archive.common.utils.http;
/* */
/* */ import com.archive.common.utils.http.HttpUtils;
/* */ import java.security.cert.X509Certificate;
/* */ import javax.net.ssl.X509TrustManager;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ class TrustAnyTrustManager
/* */ implements X509TrustManager
/* */ {
/* */ private TrustAnyTrustManager() {}
/* */
/* */ public void checkClientTrusted(X509Certificate[] chain, String authType) {}
/* */
/* */ public void checkServerTrusted(X509Certificate[] chain, String authType) {}
/* */
/* */ public X509Certificate[] getAcceptedIssuers() {
/* 250 */ return new X509Certificate[0];
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\http\HttpUtils$TrustAnyTrustManager.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,289 @@
/* */ package com.archive.common.utils.http;
/* */
/* */ import java.io.BufferedReader;
/* */ import java.io.IOException;
/* */ import java.io.InputStream;
/* */ import java.io.InputStreamReader;
/* */ import java.io.PrintWriter;
/* */ import java.net.ConnectException;
/* */ import java.net.SocketTimeoutException;
/* */ import java.net.URL;
/* */ import java.net.URLConnection;
/* */ import java.security.SecureRandom;
/* */ import javax.net.ssl.HostnameVerifier;
/* */ import javax.net.ssl.HttpsURLConnection;
/* */ import javax.net.ssl.SSLContext;
/* */ import javax.net.ssl.TrustManager;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class HttpUtils
/* */ {
/* 30 */ private static final Logger log = LoggerFactory.getLogger(com.archive.common.utils.http.HttpUtils.class);
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String sendGet(String url, String param) {
/* 41 */ return sendGet(url, param, "UTF-8");
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String sendGet(String url, String param, String contentType) {
/* 54 */ StringBuilder result = new StringBuilder();
/* 55 */ BufferedReader in = null;
/* */
/* */ try {
/* 58 */ String urlNameString = url + "?" + param;
/* 59 */ log.info("sendGet - {}", urlNameString);
/* 60 */ URL realUrl = new URL(urlNameString);
/* 61 */ URLConnection connection = realUrl.openConnection();
/* 62 */ connection.setRequestProperty("accept", "*/*");
/* 63 */ connection.setRequestProperty("connection", "Keep-Alive");
/* 64 */ connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
/* 65 */ connection.connect();
/* 66 */ in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType));
/* */ String line;
/* 68 */ while ((line = in.readLine()) != null)
/* */ {
/* 70 */ result.append(line);
/* */ }
/* 72 */ log.info("recv - {}", result);
/* */ }
/* 74 */ catch (ConnectException e) {
/* */
/* 76 */ log.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e);
/* */ }
/* 78 */ catch (SocketTimeoutException e) {
/* */
/* 80 */ log.error("调用HttpUtils.sendGet SocketTimeoutException, url=" + url + ",param=" + param, e);
/* */ }
/* 82 */ catch (IOException e) {
/* */
/* 84 */ log.error("调用HttpUtils.sendGet IOException, url=" + url + ",param=" + param, e);
/* */ }
/* 86 */ catch (Exception e) {
/* */
/* 88 */ log.error("调用HttpsUtil.sendGet Exception, url=" + url + ",param=" + param, e);
/* */ } finally {
/* */
/* */
/* */ try {
/* */
/* 94 */ if (in != null)
/* */ {
/* 96 */ in.close();
/* */ }
/* */ }
/* 99 */ catch (Exception ex) {
/* */
/* 101 */ log.error("调用in.close Exception, url=" + url + ",param=" + param, ex);
/* */ }
/* */ }
/* 104 */ return result.toString();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String sendPost(String url, String param) {
/* 116 */ PrintWriter out = null;
/* 117 */ BufferedReader in = null;
/* 118 */ StringBuilder result = new StringBuilder();
/* */
/* */ try {
/* 121 */ String urlNameString = url;
/* 122 */ log.info("sendPost - {}", urlNameString);
/* 123 */ URL realUrl = new URL(urlNameString);
/* 124 */ URLConnection conn = realUrl.openConnection();
/* 125 */ conn.setRequestProperty("accept", "*/*");
/* 126 */ conn.setRequestProperty("connection", "Keep-Alive");
/* 127 */ conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
/* 128 */ conn.setRequestProperty("Accept-Charset", "utf-8");
/* 129 */ conn.setRequestProperty("contentType", "utf-8");
/* 130 */ conn.setDoOutput(true);
/* 131 */ conn.setDoInput(true);
/* 132 */ out = new PrintWriter(conn.getOutputStream());
/* 133 */ out.print(param);
/* 134 */ out.flush();
/* 135 */ in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8"));
/* */ String line;
/* 137 */ while ((line = in.readLine()) != null)
/* */ {
/* 139 */ result.append(line);
/* */ }
/* 141 */ log.info("recv - {}", result);
/* */ }
/* 143 */ catch (ConnectException e) {
/* */
/* 145 */ log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e);
/* */ }
/* 147 */ catch (SocketTimeoutException e) {
/* */
/* 149 */ log.error("调用HttpUtils.sendPost SocketTimeoutException, url=" + url + ",param=" + param, e);
/* */ }
/* 151 */ catch (IOException e) {
/* */
/* 153 */ log.error("调用HttpUtils.sendPost IOException, url=" + url + ",param=" + param, e);
/* */ }
/* 155 */ catch (Exception e) {
/* */
/* 157 */ log.error("调用HttpsUtil.sendPost Exception, url=" + url + ",param=" + param, e);
/* */ } finally {
/* */
/* */
/* */ try {
/* */
/* 163 */ if (out != null)
/* */ {
/* 165 */ out.close();
/* */ }
/* 167 */ if (in != null)
/* */ {
/* 169 */ in.close();
/* */ }
/* */ }
/* 172 */ catch (IOException ex) {
/* */
/* 174 */ log.error("调用in.close Exception, url=" + url + ",param=" + param, ex);
/* */ }
/* */ }
/* 177 */ return result.toString();
/* */ }
/* */
/* */
/* */ public static String sendSSLPost(String url, String param) {
/* 182 */ StringBuilder result = new StringBuilder();
/* 183 */ String urlNameString = url + "?" + param;
/* */
/* */ try {
/* 186 */ log.info("sendSSLPost - {}", urlNameString);
/* 187 */ SSLContext sc = SSLContext.getInstance("SSL");
/* 188 */ sc.init(null, new TrustManager[] { (TrustManager)new TrustAnyTrustManager(null) }, new SecureRandom());
/* 189 */ URL console = new URL(urlNameString);
/* 190 */ HttpsURLConnection conn = (HttpsURLConnection)console.openConnection();
/* 191 */ conn.setRequestProperty("accept", "*/*");
/* 192 */ conn.setRequestProperty("connection", "Keep-Alive");
/* 193 */ conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
/* 194 */ conn.setRequestProperty("Accept-Charset", "utf-8");
/* 195 */ conn.setRequestProperty("contentType", "utf-8");
/* 196 */ conn.setDoOutput(true);
/* 197 */ conn.setDoInput(true);
/* */
/* 199 */ conn.setSSLSocketFactory(sc.getSocketFactory());
/* 200 */ conn.setHostnameVerifier((HostnameVerifier)new TrustAnyHostnameVerifier(null));
/* 201 */ conn.connect();
/* 202 */ InputStream is = conn.getInputStream();
/* 203 */ BufferedReader br = new BufferedReader(new InputStreamReader(is));
/* 204 */ String ret = "";
/* 205 */ while ((ret = br.readLine()) != null) {
/* */
/* 207 */ if (ret != null && !ret.trim().equals(""))
/* */ {
/* 209 */ result.append(new String(ret.getBytes("ISO-8859-1"), "utf-8"));
/* */ }
/* */ }
/* 212 */ log.info("recv - {}", result);
/* 213 */ conn.disconnect();
/* 214 */ br.close();
/* */ }
/* 216 */ catch (ConnectException e) {
/* */
/* 218 */ log.error("调用HttpUtils.sendSSLPost ConnectException, url=" + url + ",param=" + param, e);
/* */ }
/* 220 */ catch (SocketTimeoutException e) {
/* */
/* 222 */ log.error("调用HttpUtils.sendSSLPost SocketTimeoutException, url=" + url + ",param=" + param, e);
/* */ }
/* 224 */ catch (IOException e) {
/* */
/* 226 */ log.error("调用HttpUtils.sendSSLPost IOException, url=" + url + ",param=" + param, e);
/* */ }
/* 228 */ catch (Exception e) {
/* */
/* 230 */ log.error("调用HttpsUtil.sendSSLPost Exception, url=" + url + ",param=" + param, e);
/* */ }
/* 232 */ return result.toString();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean urlWhetherReachable(String urlString, int timeOutMillSeconds) {
/* 270 */ boolean flag = true;
/* */
/* */ try {
/* 273 */ URL url = new URL(urlString);
/* 274 */ URLConnection co = url.openConnection();
/* 275 */ co.setConnectTimeout(timeOutMillSeconds);
/* 276 */ co.connect();
/* 277 */ } catch (Exception e1) {
/* 278 */ System.out.println(urlString + "连接请求超时!");
/* 279 */ flag = false;
/* */ }
/* 281 */ return flag;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\http\HttpUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

File diff suppressed because it is too large Load Diff

@ -0,0 +1,416 @@
/* */ package com.archive.common.utils.reflect;
/* */
/* */ import com.archive.common.utils.DateUtils;
/* */ import com.archive.common.utils.text.Convert;
/* */ import java.lang.reflect.Field;
/* */ import java.lang.reflect.InvocationTargetException;
/* */ import java.lang.reflect.Method;
/* */ import java.lang.reflect.Modifier;
/* */ import java.lang.reflect.ParameterizedType;
/* */ import java.lang.reflect.Type;
/* */ import java.util.Date;
/* */ import org.apache.commons.lang3.StringUtils;
/* */ import org.apache.commons.lang3.Validate;
/* */ import org.apache.poi.ss.usermodel.DateUtil;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class ReflectUtils
/* */ {
/* */ private static final String SETTER_PREFIX = "set";
/* */ private static final String GETTER_PREFIX = "get";
/* */ private static final String CGLIB_CLASS_SEPARATOR = "$$";
/* 32 */ private static Logger logger = LoggerFactory.getLogger(com.archive.common.utils.reflect.ReflectUtils.class);
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static <E> E invokeGetter(Object obj, String propertyName) {
/* 41 */ Object object = obj;
/* 42 */ for (String name : StringUtils.split(propertyName, ".")) {
/* */
/* 44 */ String getterMethodName = "get" + StringUtils.capitalize(name);
/* 45 */ object = invokeMethod(object, getterMethodName, new Class[0], new Object[0]);
/* */ }
/* 47 */ return (E)object;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static <E> void invokeSetter(Object obj, String propertyName, E value) {
/* 56 */ Object object = obj;
/* 57 */ String[] names = StringUtils.split(propertyName, ".");
/* 58 */ for (int i = 0; i < names.length; i++) {
/* */
/* 60 */ if (i < names.length - 1) {
/* */
/* 62 */ String getterMethodName = "get" + StringUtils.capitalize(names[i]);
/* 63 */ object = invokeMethod(object, getterMethodName, new Class[0], new Object[0]);
/* */ }
/* */ else {
/* */
/* 67 */ String setterMethodName = "set" + StringUtils.capitalize(names[i]);
/* 68 */ invokeMethodByName(object, setterMethodName, new Object[] { value });
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static <E> E getFieldValue(Object obj, String fieldName) {
/* 79 */ Field field = getAccessibleField(obj, fieldName);
/* 80 */ if (field == null) {
/* */
/* 82 */ logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 ");
/* 83 */ return null;
/* */ }
/* 85 */ E result = null;
/* */
/* */ try {
/* 88 */ result = (E)field.get(obj);
/* */ }
/* 90 */ catch (IllegalAccessException e) {
/* */
/* 92 */ logger.error("不可能抛出的异常{}", e.getMessage());
/* */ }
/* 94 */ return result;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static <E> void setFieldValue(Object obj, String fieldName, E value) {
/* 102 */ Field field = getAccessibleField(obj, fieldName);
/* 103 */ if (field == null) {
/* */
/* */
/* 106 */ logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 ");
/* */
/* */ return;
/* */ }
/* */ try {
/* 111 */ field.set(obj, value);
/* */ }
/* 113 */ catch (IllegalAccessException e) {
/* */
/* 115 */ logger.error("不可能抛出的异常: {}", e.getMessage());
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static <E> E invokeMethod(Object obj, String methodName, Class<?>[] parameterTypes, Object[] args) {
/* 128 */ if (obj == null || methodName == null)
/* */ {
/* 130 */ return null;
/* */ }
/* 132 */ Method method = getAccessibleMethod(obj, methodName, parameterTypes);
/* 133 */ if (method == null) {
/* */
/* 135 */ logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
/* 136 */ return null;
/* */ }
/* */
/* */ try {
/* 140 */ return (E)method.invoke(obj, args);
/* */ }
/* 142 */ catch (Exception e) {
/* */
/* 144 */ String msg = "method: " + method + ", obj: " + obj + ", args: " + args + "";
/* 145 */ throw convertReflectionExceptionToUnchecked(msg, e);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static <E> E invokeMethodByName(Object obj, String methodName, Object[] args) {
/* 157 */ Method method = getAccessibleMethodByName(obj, methodName, args.length);
/* 158 */ if (method == null) {
/* */
/* */
/* 161 */ logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
/* 162 */ return null;
/* */ }
/* */
/* */
/* */ try {
/* 167 */ Class<?>[] cs = method.getParameterTypes();
/* 168 */ for (int i = 0; i < cs.length; i++) {
/* */
/* 170 */ if (args[i] != null && !args[i].getClass().equals(cs[i]))
/* */ {
/* 172 */ if (cs[i] == String.class) {
/* */
/* 174 */ args[i] = Convert.toStr(args[i]);
/* 175 */ if (StringUtils.endsWith((String)args[i], ".0"))
/* */ {
/* 177 */ args[i] = StringUtils.substringBefore((String)args[i], ".0");
/* */ }
/* */ }
/* 180 */ else if (cs[i] == Integer.class) {
/* */
/* 182 */ args[i] = Convert.toInt(args[i]);
/* */ }
/* 184 */ else if (cs[i] == Long.class) {
/* */
/* 186 */ args[i] = Convert.toLong(args[i]);
/* */ }
/* 188 */ else if (cs[i] == Double.class) {
/* */
/* 190 */ args[i] = Convert.toDouble(args[i]);
/* */ }
/* 192 */ else if (cs[i] == Float.class) {
/* */
/* 194 */ args[i] = Convert.toFloat(args[i]);
/* */ }
/* 196 */ else if (cs[i] == Date.class) {
/* */
/* 198 */ if (args[i] instanceof String)
/* */ {
/* 200 */ args[i] = DateUtils.parseDate(args[i]);
/* */ }
/* */ else
/* */ {
/* 204 */ args[i] = DateUtil.getJavaDate(((Double)args[i]).doubleValue());
/* */ }
/* */
/* 207 */ } else if (cs[i] == boolean.class || cs[i] == Boolean.class) {
/* */
/* 209 */ args[i] = Convert.toBool(args[i]);
/* */ }
/* */ }
/* */ }
/* 213 */ return (E)method.invoke(obj, args);
/* */ }
/* 215 */ catch (Exception e) {
/* */
/* 217 */ String msg = "method: " + method + ", obj: " + obj + ", args: " + args + "";
/* 218 */ throw convertReflectionExceptionToUnchecked(msg, e);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static Field getAccessibleField(Object obj, String fieldName) {
/* 229 */ if (obj == null)
/* */ {
/* 231 */ return null;
/* */ }
/* 233 */ Validate.notBlank(fieldName, "fieldName can't be blank", new Object[0]);
/* 234 */ for (Class<?> superClass = obj.getClass(); superClass != Object.class; superClass = superClass.getSuperclass()) {
/* */
/* */
/* */ try {
/* 238 */ Field field = superClass.getDeclaredField(fieldName);
/* 239 */ makeAccessible(field);
/* 240 */ return field;
/* */ }
/* 242 */ catch (NoSuchFieldException e) {}
/* */ }
/* */
/* */
/* */
/* 247 */ return null;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static Method getAccessibleMethod(Object obj, String methodName, Class<?>... parameterTypes) {
/* 260 */ if (obj == null)
/* */ {
/* 262 */ return null;
/* */ }
/* 264 */ Validate.notBlank(methodName, "methodName can't be blank", new Object[0]);
/* 265 */ for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) {
/* */
/* */
/* */ try {
/* 269 */ Method method = searchType.getDeclaredMethod(methodName, parameterTypes);
/* 270 */ makeAccessible(method);
/* 271 */ return method;
/* */ }
/* 273 */ catch (NoSuchMethodException e) {}
/* */ }
/* */
/* */
/* */
/* 278 */ return null;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static Method getAccessibleMethodByName(Object obj, String methodName, int argsNum) {
/* 290 */ if (obj == null)
/* */ {
/* 292 */ return null;
/* */ }
/* 294 */ Validate.notBlank(methodName, "methodName can't be blank", new Object[0]);
/* 295 */ for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) {
/* */
/* 297 */ Method[] methods = searchType.getDeclaredMethods();
/* 298 */ for (Method method : methods) {
/* */
/* 300 */ if (method.getName().equals(methodName) && (method.getParameterTypes()).length == argsNum) {
/* */
/* 302 */ makeAccessible(method);
/* 303 */ return method;
/* */ }
/* */ }
/* */ }
/* 307 */ return null;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static void makeAccessible(Method method) {
/* 315 */ if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers())) &&
/* 316 */ !method.isAccessible())
/* */ {
/* 318 */ method.setAccessible(true);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static void makeAccessible(Field field) {
/* 327 */ if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) ||
/* 328 */ Modifier.isFinal(field.getModifiers())) && !field.isAccessible())
/* */ {
/* 330 */ field.setAccessible(true);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static <T> Class<T> getClassGenricType(Class clazz) {
/* 341 */ return getClassGenricType(clazz, 0);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static Class getClassGenricType(Class clazz, int index) {
/* 350 */ Type genType = clazz.getGenericSuperclass();
/* */
/* 352 */ if (!(genType instanceof ParameterizedType)) {
/* */
/* 354 */ logger.debug(clazz.getSimpleName() + "'s superclass not ParameterizedType");
/* 355 */ return Object.class;
/* */ }
/* */
/* 358 */ Type[] params = ((ParameterizedType)genType).getActualTypeArguments();
/* */
/* 360 */ if (index >= params.length || index < 0) {
/* */
/* 362 */ logger.debug("Index: " + index + ", Size of " + clazz.getSimpleName() + "'s Parameterized Type: " + params.length);
/* */
/* 364 */ return Object.class;
/* */ }
/* 366 */ if (!(params[index] instanceof Class)) {
/* */
/* 368 */ logger.debug(clazz.getSimpleName() + " not set the actual class on superclass generic parameter");
/* 369 */ return Object.class;
/* */ }
/* */
/* 372 */ return (Class)params[index];
/* */ }
/* */
/* */
/* */ public static Class<?> getUserClass(Object instance) {
/* 377 */ if (instance == null)
/* */ {
/* 379 */ throw new RuntimeException("Instance must not be null");
/* */ }
/* 381 */ Class<?> clazz = instance.getClass();
/* 382 */ if (clazz != null && clazz.getName().contains("$$")) {
/* */
/* 384 */ Class<?> superClass = clazz.getSuperclass();
/* 385 */ if (superClass != null && !Object.class.equals(superClass))
/* */ {
/* 387 */ return superClass;
/* */ }
/* */ }
/* 390 */ return clazz;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static RuntimeException convertReflectionExceptionToUnchecked(String msg, Exception e) {
/* 399 */ if (e instanceof IllegalAccessException || e instanceof IllegalArgumentException || e instanceof NoSuchMethodException)
/* */ {
/* */
/* 402 */ return new IllegalArgumentException(msg, e);
/* */ }
/* 404 */ if (e instanceof InvocationTargetException)
/* */ {
/* 406 */ return new RuntimeException(msg, ((InvocationTargetException)e).getTargetException());
/* */ }
/* 408 */ return new RuntimeException(msg, e);
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\reflect\ReflectUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,36 @@
/* */ package com.archive.common.utils.security;
/* */
/* */ import com.archive.framework.shiro.realm.UserRealm;
/* */ import org.apache.shiro.SecurityUtils;
/* */ import org.apache.shiro.mgt.RealmSecurityManager;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class AuthorizationUtils
/* */ {
/* */ public static void clearAllCachedAuthorizationInfo() {
/* 19 */ getUserRealm().clearAllCachedAuthorizationInfo();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static UserRealm getUserRealm() {
/* 27 */ RealmSecurityManager rsm = (RealmSecurityManager)SecurityUtils.getSecurityManager();
/* 28 */ return rsm.getRealms().iterator().next();
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\security\AuthorizationUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -0,0 +1,83 @@
/* */ package com.archive.common.utils.security;
/* */
/* */ import com.archive.common.utils.MessageUtils;
/* */ import org.apache.commons.lang3.StringUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class PermissionUtils
/* */ {
/* */ public static final String VIEW_PERMISSION = "no.view.permission";
/* */ public static final String CREATE_PERMISSION = "no.create.permission";
/* */ public static final String UPDATE_PERMISSION = "no.update.permission";
/* */ public static final String DELETE_PERMISSION = "no.delete.permission";
/* */ public static final String EXPORT_PERMISSION = "no.export.permission";
/* */ public static final String PERMISSION = "no.permission";
/* */
/* */ public static String getMsg(String permissionsStr) {
/* 52 */ String permission = StringUtils.substringBetween(permissionsStr, "[", "]");
/* 53 */ String msg = MessageUtils.message("no.permission", new Object[] { permission });
/* 54 */ if (StringUtils.endsWithIgnoreCase(permission, "add")) {
/* */
/* 56 */ msg = MessageUtils.message("no.create.permission", new Object[] { permission });
/* */ }
/* 58 */ else if (StringUtils.endsWithIgnoreCase(permission, "edit")) {
/* */
/* 60 */ msg = MessageUtils.message("no.update.permission", new Object[] { permission });
/* */ }
/* 62 */ else if (StringUtils.endsWithIgnoreCase(permission, "remove")) {
/* */
/* 64 */ msg = MessageUtils.message("no.delete.permission", new Object[] { permission });
/* */ }
/* 66 */ else if (StringUtils.endsWithIgnoreCase(permission, "export")) {
/* */
/* 68 */ msg = MessageUtils.message("no.export.permission", new Object[] { permission });
/* */ }
/* 70 */ else if (StringUtils.endsWithAny(permission, (CharSequence[])new String[] { "view", "list" })) {
/* */
/* */
/* 73 */ msg = MessageUtils.message("no.view.permission", new Object[] { permission });
/* */ }
/* 75 */ return msg;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\security\PermissionUtils.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save