Compare commits
179 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ca3d13659 | ||
|
|
0ac237fbbd | ||
|
|
d9da55d4bf | ||
|
|
802152badd | ||
|
|
7b4169f3e6 | ||
|
|
c3b3831378 | ||
|
|
73e6470b39 | ||
|
|
458d118d85 | ||
|
|
659deb6132 | ||
|
|
f8c121ba6f | ||
|
|
0307d3f544 | ||
|
|
6f0bfb1a7d | ||
|
|
f7e85daed2 | ||
|
|
206a6dc1ff | ||
|
|
e29e9552ac | ||
|
|
c418a0b952 | ||
|
|
c5269464df | ||
|
|
d327b7284a | ||
|
|
b0eac9b177 | ||
|
|
815e172e02 | ||
|
|
66ac435278 | ||
|
|
84f2062c7e | ||
|
|
9df344a119 | ||
|
|
a50df93439 | ||
|
|
fbc49f0248 | ||
|
|
9420c39c75 | ||
|
|
2bd7578f2b | ||
|
|
78502781a9 | ||
|
|
c3127565dd | ||
|
|
de574b5472 | ||
|
|
016d67024f | ||
|
|
73fcbcb540 | ||
|
|
1527f3dc9d | ||
|
|
d436589c83 | ||
|
|
3098267045 | ||
|
|
0f187d2a6f | ||
|
|
010e8ee104 | ||
|
|
a9f33a9ed5 | ||
|
|
ea9870696a | ||
|
|
33649ed3f9 | ||
|
|
3de3ac4cff | ||
|
|
7139b08c9e | ||
|
|
f2ca53f46e | ||
|
|
b5083beda9 | ||
|
|
0452e5ce05 | ||
|
|
959ed53960 | ||
|
|
d01b7f1820 | ||
|
|
141cebf2ff | ||
|
|
84d859dd54 | ||
|
|
d2e80af568 | ||
|
|
be30a3f9d3 | ||
|
|
608d124f51 | ||
|
|
377b242e6d | ||
|
|
28f8e11c5f | ||
|
|
730230fa4e | ||
|
|
0b98d0abb4 | ||
|
|
0cb1581176 | ||
|
|
5ed663e112 | ||
|
|
b5fd837ccf | ||
|
|
38d6bae04f | ||
|
|
e49bf32117 | ||
|
|
bc3ea0e10c | ||
|
|
305dc743b2 | ||
|
|
6f0360bad5 | ||
|
|
5012c4bd53 | ||
|
|
dd69b3bb1f | ||
|
|
33d20c518e | ||
|
|
d0935cbda0 | ||
|
|
3ed9a47c66 | ||
|
|
3f6989d039 | ||
|
|
6f6e997fd3 | ||
|
|
d9987b41ea | ||
|
|
c33ad6075e | ||
|
|
a32c333a6c | ||
|
|
ed66f035e5 | ||
|
|
f5dd706e6e | ||
|
|
6766694272 | ||
|
|
2f22b64c0e | ||
|
|
4e6b108e7e | ||
|
|
24629f06b4 | ||
|
|
47c9251389 | ||
|
|
dda5f64910 | ||
|
|
704030729a | ||
|
|
c708809a19 | ||
|
|
2bbec9b79a | ||
|
|
e19f27f597 | ||
|
|
68781d4685 | ||
|
|
da69124968 | ||
|
|
8d9632bcaa | ||
|
|
1c0e63bf98 | ||
|
|
c04d45431c | ||
|
|
c5f8508a9e | ||
|
|
06f295bb66 | ||
|
|
bfc578e77c | ||
|
|
b5c10fc224 | ||
|
|
60580b40a4 | ||
|
|
af70808da6 | ||
|
|
c446ee8f75 | ||
|
|
86384a1f23 | ||
|
|
d63b6ab094 | ||
|
|
020d1d99e1 | ||
|
|
32fb562775 | ||
|
|
af50468743 | ||
|
|
cab794ecc4 | ||
|
|
0c511940aa | ||
|
|
60dea50e43 | ||
|
|
cbfeb09a22 | ||
|
|
ef97488ea0 | ||
|
|
8873053c06 | ||
|
|
a65ea27485 | ||
|
|
4343601da1 | ||
|
|
f07e6d99e3 | ||
|
|
fc4b3139aa | ||
|
|
fe9d107eef | ||
|
|
0094bf2e69 | ||
|
|
c0fb149558 | ||
|
|
eb55969063 | ||
|
|
488c53def0 | ||
|
|
c02e67f85f | ||
|
|
9f62986a1e | ||
|
|
07136a6679 | ||
|
|
c3edb50e80 | ||
|
|
aee1861630 | ||
|
|
4196b2531d | ||
|
|
dfaeacae92 | ||
|
|
b304c48dd1 | ||
|
|
d045534be6 | ||
|
|
56b923f5db | ||
|
|
f3e8231814 | ||
|
|
2ca04e654f | ||
|
|
149f4ab061 | ||
|
|
a22c08738a | ||
|
|
d28f3250e3 | ||
|
|
bf3b88b43b | ||
|
|
0a98e81109 | ||
|
|
e3c051d443 | ||
|
|
282a46458a | ||
|
|
637a9d1ace | ||
|
|
959eff62df | ||
|
|
fdbdf79383 | ||
|
|
800c53c6fd | ||
|
|
c3f4f91a37 | ||
|
|
31f6babb97 | ||
|
|
668e7069f7 | ||
|
|
5cd4994624 | ||
|
|
941bd0f65e | ||
|
|
5cf6e1f8d4 | ||
|
|
def1b4e06a | ||
|
|
f5b8e989b7 | ||
|
|
1918dfbaa0 | ||
|
|
7fcc407514 | ||
|
|
b79895aa56 | ||
|
|
4700d4e061 | ||
|
|
a8be751e65 | ||
|
|
1b1073eab1 | ||
|
|
56e2a66bdf | ||
|
|
c5654474b0 | ||
|
|
a125c6f907 | ||
|
|
a314351fc9 | ||
|
|
23493afb2f | ||
|
|
e8369320ab | ||
|
|
a19fa65166 | ||
|
|
ea12290f03 | ||
|
|
c6662407a7 | ||
|
|
29e45fff7f | ||
|
|
e7089d9cc5 | ||
|
|
f0493cea77 | ||
|
|
8854225934 | ||
|
|
5ad35cefda | ||
|
|
1921efa27b | ||
|
|
2e9de7ee64 | ||
|
|
e352927396 | ||
|
|
51b26c077d | ||
|
|
2c5f55a876 | ||
|
|
c52f7f5c77 | ||
|
|
7f46d2d371 | ||
|
|
34d8201641 | ||
|
|
92e1c1d9ef | ||
|
|
ee3748c361 |
3
.gitignore
vendored
@@ -4,4 +4,5 @@ rebel.xml
|
||||
/.idea/
|
||||
*.iml
|
||||
/static/
|
||||
/ipdb/
|
||||
/config/
|
||||
/runtime/
|
||||
|
||||
@@ -2,6 +2,18 @@ stages:
|
||||
- deploy
|
||||
- package
|
||||
|
||||
build-jar:
|
||||
stage: deploy
|
||||
tags:
|
||||
- hzkepai
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == "master"
|
||||
script:
|
||||
- mvn clean package -Dmaven.test.skip=true
|
||||
- systemctl stop tieshengboot-ademo
|
||||
- cp springboot-ademo/target/*.jar /usr/local/nginx/html/demo.tmp.kepai365.ltd/
|
||||
- systemctl start tieshengboot-ademo
|
||||
|
||||
deploy-jar:
|
||||
stage: deploy
|
||||
tags:
|
||||
@@ -9,14 +21,10 @@ deploy-jar:
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
- cd springboot-launcher
|
||||
- mvn clean install
|
||||
- cd ..
|
||||
- mvn clean deploy -Dmaven.test.skip -DaltDeploymentRepository=master::default::file:/usr/local/nginx/html/kepai-repo
|
||||
- cd /usr/local/nginx/html/kepai-repo
|
||||
- mvn clean deploy -Dmaven.test.skip -DaltDeploymentRepository=master::default::file:$TAG_REPO_FOLDER
|
||||
- cd $TAG_REPO_FOLDER
|
||||
- git checkout master
|
||||
- git pull
|
||||
- git add .
|
||||
- git commit -m "deploy $CI_PROJECT_NAME $CI_COMMIT_TAG"
|
||||
- git push origin master
|
||||
|
||||
|
||||
94
CHANGELOG.md
Normal file
@@ -0,0 +1,94 @@
|
||||
## 1.0.7
|
||||
|
||||
## 新增
|
||||
|
||||
> feat(web): 增加uploadFileCustomize方法,允许自定义文件存放情况
|
||||
> feat(database): 增加db/data目录,存放初始化数据的sql
|
||||
|
||||
## 优化
|
||||
|
||||
> perf(login): 增加默认值,防止token解析异常
|
||||
|
||||
## 1.0.6
|
||||
|
||||
### 新增
|
||||
|
||||
> 1,新增 **OperationIgnore** 注解,可以指定接口忽略操作日志的收集。
|
||||
> 2,**OperationLog** 增加 desensitize 属性,用来脱敏指定的字段。
|
||||
|
||||
## 1.0.2
|
||||
|
||||
### 调整
|
||||
|
||||
> 1,增加数据库定时备份;
|
||||
> 2,增加过期备份的删除操作,默认过期时间为7天;
|
||||
> 3,调整阿里云短信类,方便扩展其他方法。
|
||||
> 4,消息发送接口该body类型为 **JSONObject**
|
||||
> 5,调整消息发送接口和方法(不兼容旧版本)
|
||||
|
||||
## 1.0.1
|
||||
|
||||
### 调整
|
||||
|
||||
fastjson增加配置 **DisableCircularReferenceDetect**,禁用相同的对象写成引用的形式。
|
||||
|
||||
## 1.0.0
|
||||
|
||||
### 升级
|
||||
|
||||
> 1,hutool依赖升级:5.8.11 -> 5.8.16
|
||||
> 2,fastjson依赖升级:1.2.78 -> 1.2.83
|
||||
> 3,mybatis-plus依赖升级:3.5.1 -> 3.5.3
|
||||
|
||||
### 调整
|
||||
|
||||
> 1,**TieshengWebConfigurer** 增加 **configSystemCheck** 方法,可根据情况校验系统配置参数。
|
||||
|
||||
从该版本开始,仓库地址改为:
|
||||
|
||||
``` pom
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>kepai-repo</id>
|
||||
<url>http://git.kepai365.com/tiesheng/repository/raw/master</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
```
|
||||
|
||||
## 0.9.3
|
||||
|
||||
> 1,增加版本对比器,防止某些情况下版本对比失效;
|
||||
>
|
||||
|
||||
## 0.8.3
|
||||
|
||||
### 调整
|
||||
|
||||
> 1,优化返回数据加密;
|
||||
> 2,上传文件接口调整,统一为**application/json**格式;
|
||||
|
||||
## 0.8.0
|
||||
|
||||
### 调整
|
||||
|
||||
> 1,移除**PasswordUtil**类,新增**EncryptConfig**配置;
|
||||
> 2,默认启用网络请求的加解密,前端请配合接口使用。
|
||||
|
||||
## 0.7.4
|
||||
|
||||
### 新增
|
||||
|
||||
> 现在操作日志默认收集(不包括GET请求):使用方法名称和接口作为参数存储。如果存在OperationLog注解,则使用注解的内容。
|
||||
|
||||
## 0.7.3
|
||||
|
||||
### 增加
|
||||
|
||||
> 1,TsTokenConfig增加新的属性**ignorePaths**,用于通过路径忽略token;
|
||||
> 2,PasswordUtils增加密码复杂度校验方法;
|
||||
> 3,PasswordUtils.verifyPassword增加登录次数限制:10分钟内不能错误6次;
|
||||
>
|
||||
|
||||
### 调整
|
||||
|
||||
> 1,TsTokenConfig中的**ignores**属性调整为**testMap**;
|
||||
4
README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
## 杭州铁晟科技有限公司基础项目
|
||||
|
||||
更新日志可点击查看[changelog](./CHANGELOG.md ':include')
|
||||
|
||||
62
pom.xml
@@ -4,9 +4,9 @@
|
||||
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.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>springboot-parent</name>
|
||||
<description>杭州铁晟科技有限公司基础依赖</description>
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<modules>
|
||||
<module>springboot-ademo</module>
|
||||
<module>springboot-db-migration</module>
|
||||
<module>springboot-database</module>
|
||||
<module>springboot-login</module>
|
||||
<module>springboot-web</module>
|
||||
<module>springboot-util</module>
|
||||
@@ -28,7 +28,6 @@
|
||||
<module>springboot-message</module>
|
||||
<module>springboot-encrypt</module>
|
||||
<module>springboot-annotation</module>
|
||||
<module>springboot-launcher</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
@@ -56,57 +55,57 @@
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<artifactId>springboot-db-migration</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-database</artifactId>
|
||||
<version>1.0.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-login</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-web</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-util</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-platform</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-message</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-encrypt</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-annotation</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-poi</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -118,7 +117,7 @@
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.5.1</version>
|
||||
<version>3.5.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
@@ -127,10 +126,7 @@
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>kepai-repo-plugin</id>
|
||||
<url>http://git.kepai365.com/zeng_wenhao/kepai-repo/raw/master</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<url>http://git.kepai365.com/tiesheng/repository/raw/master</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
@@ -138,13 +134,15 @@
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<artifactId>launcher-maven-plugin</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<groupId>com.tiesheng.springboot-plugin</groupId>
|
||||
<artifactId>tiesheng-maven-plugin</artifactId>
|
||||
<version>0.0.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>initScript</goal>
|
||||
<goal>initStartScript</goal>
|
||||
<goal>mysqlComparison</goal>
|
||||
<goal>mysqlDoc</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
BIN
springboot-ademo/.DS_Store
vendored
Normal file
@@ -4,9 +4,9 @@
|
||||
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>
|
||||
<parent>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-ademo</artifactId>
|
||||
@@ -16,30 +16,35 @@
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<!-- 该模块不发布到maven仓库 -->
|
||||
<maven.deploy.skip>true</maven.deploy.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>kepai-repo</id>
|
||||
<url>http://git.kepai365.com/zeng_wenhao/kepai-repo/raw/master</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<url>http://git.kepai365.com/tiesheng/repository/raw/master</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<artifactId>launcher-maven-plugin</artifactId>
|
||||
<groupId>com.tiesheng.springboot-plugin</groupId>
|
||||
<artifactId>tiesheng-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.tiesheng.demo;
|
||||
|
||||
import com.tiesheng.core.EnableTieshengWeb;
|
||||
import com.tiesheng.demo.config.DemoWebConfigurer;
|
||||
import com.tiesheng.encrypt.EnableEncryptConfig;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
@@ -13,6 +14,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
@EnableTransactionManagement
|
||||
@SpringBootApplication
|
||||
@EnableTieshengWeb(webConfigurer = DemoWebConfigurer.class)
|
||||
//@EnableEncryptConfig
|
||||
public class DemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.tiesheng.demo.config;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.tiesheng.core.pojos.CurrentWebUser;
|
||||
import com.tiesheng.core.pojos.RequestUserInfo;
|
||||
import com.tiesheng.core.pojos.dao.CorePlatformUnique;
|
||||
import com.tiesheng.core.service.TieshengWebConfigurer;
|
||||
import com.tiesheng.login.config.token.bean.TokenBean;
|
||||
@@ -19,35 +19,36 @@ public class DemoWebConfigurer implements TieshengWebConfigurer {
|
||||
GlobalConfig globalConfig;
|
||||
|
||||
@Override
|
||||
public CurrentWebUser getCurrentUserName(TokenBean tokenBean) {
|
||||
return null;
|
||||
public RequestUserInfo getCurrentUserName(TokenBean tokenBean) {
|
||||
RequestUserInfo info = new RequestUserInfo();
|
||||
info.setId("1");
|
||||
info.setName("test");
|
||||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoginConfigurer loginConfigurer() {
|
||||
return new LoginConfigurer() {
|
||||
@Override
|
||||
public TokenBean doLogin(CorePlatformUnique platformUnique, String to) {
|
||||
public TokenBean login(CorePlatformUnique platformUnique) {
|
||||
TokenBean tokenBean = null;
|
||||
if (!StrUtil.isEmpty(platformUnique.getUserId())) {
|
||||
tokenBean = new TokenBean(platformUnique.getUserId(), "", globalConfig.getService());
|
||||
} else {
|
||||
// 获取用户信息判断是否可登录
|
||||
|
||||
// 默认跳转到mobile
|
||||
to = StrUtil.emptyToDefault(to, "mobile");
|
||||
}
|
||||
|
||||
TokenBean tokenBean = null;
|
||||
if (!StrUtil.isEmpty(platformUnique.getUserId())) {
|
||||
tokenBean = new TokenBean(platformUnique.getUserId(), to, globalConfig.getService());
|
||||
} else {
|
||||
// 获取用户信息判断是否可登录
|
||||
}
|
||||
|
||||
return tokenBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void redirect(TokenBean bean, String to, String extra, HttpServletResponse response) {
|
||||
if (Objects.equals(bean.getEnvironmentType(), "mobile")) {
|
||||
globalConfig.redirect("mobile", "/?token=" + bean.toToken(), response);
|
||||
}
|
||||
}
|
||||
};
|
||||
return tokenBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void redirect(TokenBean bean, String to, String extra, HttpServletResponse response) {
|
||||
|
||||
// 默认跳转到mobile
|
||||
to = StrUtil.emptyToDefault(to, "mobile");
|
||||
bean.setEnvironmentType(to);
|
||||
|
||||
if (Objects.equals(bean.getEnvironmentType(), "mobile")) {
|
||||
globalConfig.redirect("mobile", "/?token=" + bean.toToken(), response);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.tiesheng.demo.config;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Component
|
||||
public class DemoWebMvcConfigurer implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("/mobile/**").addResourceLocations("classpath:/mobile/0.0.13/");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.tiesheng.demo.config;
|
||||
|
||||
|
||||
import com.tiesheng.core.service.CoreConfigService;
|
||||
import com.tiesheng.core.service.CoreJobService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@Component
|
||||
public class TestJobConfig {
|
||||
|
||||
@Autowired
|
||||
CoreJobService coreJobService;
|
||||
@Autowired
|
||||
CoreConfigService coreConfigService;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
|
||||
coreConfigService.refreshFunc("230328001", "demo", "辅导员统计", "辅导员责任班级,学生展示");
|
||||
|
||||
// 辅导员职位
|
||||
coreJobService.refresh("class_fdy", "辅导员", "辅导员", 1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +1,37 @@
|
||||
package com.tiesheng.demo.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.TimeInterval;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.hutool.log.LogFactory;
|
||||
import cn.hutool.poi.excel.ExcelUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.read.listener.ReadListener;
|
||||
import com.tiesheng.annotation.operation.OperationLog;
|
||||
import com.tiesheng.annotation.token.TokenIgnore;
|
||||
import com.tiesheng.message.config.aliyun.AliyunSmsConfig;
|
||||
import com.tiesheng.core.service.CoreLogService;
|
||||
import com.tiesheng.core.service.CoreMessageService;
|
||||
import com.tiesheng.core.util.ProcessImportConsumer;
|
||||
import com.tiesheng.database.config.DbBackupConfig;
|
||||
import com.tiesheng.demo.pojos.PoiBean;
|
||||
import com.tiesheng.demo.pojos.TestFile;
|
||||
import com.tiesheng.login.config.token.TsTokenConfig;
|
||||
import com.tiesheng.message.pojos.MessageReqResp;
|
||||
import com.tiesheng.message.pojos.UserChannel;
|
||||
import com.tiesheng.util.config.EncryptConfig;
|
||||
import com.tiesheng.util.config.GlobalConfig;
|
||||
import com.tiesheng.util.config.Ip2regionConfig;
|
||||
import com.tiesheng.util.pojos.ApiResp;
|
||||
import com.tiesheng.util.pojos.FileUploadPath;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
@@ -23,32 +43,64 @@ public class TestController {
|
||||
@Autowired
|
||||
GlobalConfig globalConfig;
|
||||
@Autowired
|
||||
AliyunSmsConfig aliyunSmsConfig;
|
||||
TsTokenConfig tsTokenConfig;
|
||||
@Autowired
|
||||
Ip2regionConfig ip2regionConfig;
|
||||
@Autowired
|
||||
EncryptConfig encryptConfig;
|
||||
@Autowired
|
||||
CoreMessageService coreMessageService;
|
||||
@Autowired
|
||||
CoreLogService coreLogService;
|
||||
@Autowired
|
||||
DbBackupConfig dbBackupConfig;
|
||||
|
||||
|
||||
@RequestMapping("/index")
|
||||
@TokenIgnore
|
||||
public ApiResp<String> index() {
|
||||
dbBackupConfig.dbBackup();
|
||||
return ApiResp.respOK("hello world");
|
||||
}
|
||||
|
||||
@RequestMapping("/redirect")
|
||||
@TokenIgnore
|
||||
public void redirect(HttpServletResponse response) {
|
||||
|
||||
ArrayList<String> strings = CollUtil.newArrayList("11111", "22222");
|
||||
coreLogService.addProcess("fdfd", strings, new ProcessImportConsumer<String>() {
|
||||
@Override
|
||||
public int accept(List<String> list) {
|
||||
LogFactory.get().info("list: " + list.size());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFailFile() {
|
||||
LogFactory.get().info("getFailFile: " + strings.size());
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
LogFactory.get().info("strings: " + strings.size());
|
||||
|
||||
|
||||
// tsTokenConfig.validToken("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NzYwMDY4NzUsImlkIjoiMSIsImVudmlyb25tZW50VHlwZSI6Im1vYmlsZSIsInNlcnZpY2UiOiJjb250ZXN0LXJlc2VydmUiLCJleHRyYSI6IiJ9.nsfxEFpCNHC7eNCS5DJXdu1VDdnHrTjSfgrozND70Lc", true);
|
||||
globalConfig.redirect("mobile", "/test", response);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/send")
|
||||
@GetMapping("/send")
|
||||
@TokenIgnore
|
||||
public ApiResp<MessageReqResp> sendMessage() {
|
||||
MessageReqResp reqResp = aliyunSmsConfig.sendSms("13567116463", "SMS_154950909",
|
||||
JSONUtil.createObj().putOpt("code", "123456"));
|
||||
|
||||
MessageReqResp reqResp = coreMessageService.send(new UserChannel("13567116463", "sms"),
|
||||
JSONUtil.createObj().putOpt("code", "123456").putOpt("template_code", "SMS_154950909"));
|
||||
|
||||
return ApiResp.respOK(reqResp);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/export")
|
||||
@TokenIgnore
|
||||
public ApiResp<String> export() {
|
||||
|
||||
// List<TestFile> list = new ArrayList<>();
|
||||
@@ -66,8 +118,78 @@ public class TestController {
|
||||
@RequestMapping("/uploadPath")
|
||||
@TokenIgnore
|
||||
public ApiResp<String> uploadPath() {
|
||||
FileUploadPath uploadPath = FileUploadPath.get("http://scv6.tmp.kepai365.ltd/upload/2023-01/2b4b6b7b-70d0-4683-859a-f799adc4f04c.xls");
|
||||
FileUploadPath uploadPath = FileUploadPath.file("http://scv6.tmp.kepai365.ltd/upload/2023-01/2b4b6b7b-70d0-4683-859a-f799adc4f04c.xls");
|
||||
return ApiResp.respOK(uploadPath.getAbsolutePath());
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("searchIP")
|
||||
@TokenIgnore
|
||||
public ApiResp<String> searchIp() {
|
||||
String search = ip2regionConfig.search("127.0.0.1");
|
||||
return ApiResp.respOK(search);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("desensitize")
|
||||
@TokenIgnore
|
||||
public ApiResp<List<TestFile>> desensitize() {
|
||||
TestFile file = new TestFile("11111");
|
||||
file.setTest("111111");
|
||||
TestFile file1 = new TestFile("22222");
|
||||
file1.setTest("22222");
|
||||
return ApiResp.respOK(CollUtil.newArrayList(file, file1));
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("passwd")
|
||||
@TokenIgnore
|
||||
public ApiResp<String> passwd() {
|
||||
|
||||
String passwdCreate = encryptConfig.passwdCreate("12345Zeng!", "");
|
||||
LogFactory.get().info(passwdCreate);
|
||||
encryptConfig.passwdVerify("12345Zeng!", passwdCreate);
|
||||
|
||||
return ApiResp.respOK("");
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("poi")
|
||||
@TokenIgnore
|
||||
public ApiResp<String> poi() {
|
||||
TimeInterval timeInterval = new TimeInterval();
|
||||
|
||||
FileUploadPath file = FileUploadPath.file("/upload/test.xlsx");
|
||||
|
||||
EasyExcel.read(new File(file.getAbsolutePath()), PoiBean.class, new ReadListener<PoiBean>() {
|
||||
|
||||
@Override
|
||||
public void invoke(PoiBean poiBean, AnalysisContext analysisContext) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
|
||||
|
||||
}
|
||||
}).sheet().doRead();
|
||||
|
||||
System.out.println("timeInterval: " + timeInterval.interval());
|
||||
return ApiResp.respOK("");
|
||||
}
|
||||
|
||||
@RequestMapping("poiTool")
|
||||
@TokenIgnore
|
||||
public ApiResp<String> poiTool() {
|
||||
TimeInterval timeInterval = new TimeInterval();
|
||||
|
||||
FileUploadPath file = FileUploadPath.file("/upload/test.xlsx");
|
||||
|
||||
ExcelUtil.getReader(new File(file.getAbsolutePath())).read();
|
||||
|
||||
System.out.println("timeInterval: " + timeInterval.interval());
|
||||
|
||||
return ApiResp.respOK("");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.tiesheng.demo.pojos;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
public class PoiBean {
|
||||
|
||||
@ExcelProperty("学院")
|
||||
private String college;
|
||||
private String type;
|
||||
private String name;
|
||||
private String no;
|
||||
private String sex;
|
||||
private String fdy;
|
||||
private String fdyNo;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// setter\getter
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public String getCollege() {
|
||||
return college;
|
||||
}
|
||||
|
||||
public void setCollege(String college) {
|
||||
this.college = college;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getNo() {
|
||||
return no;
|
||||
}
|
||||
|
||||
public void setNo(String no) {
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getFdy() {
|
||||
return fdy;
|
||||
}
|
||||
|
||||
public void setFdy(String fdy) {
|
||||
this.fdy = fdy;
|
||||
}
|
||||
|
||||
public String getFdyNo() {
|
||||
return fdyNo;
|
||||
}
|
||||
|
||||
public void setFdyNo(String fdyNo) {
|
||||
this.fdyNo = fdyNo;
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,21 @@
|
||||
//package com.tiesheng.demo.pojos;
|
||||
//
|
||||
//import com.alibaba.excel.annotation.ExcelProperty;
|
||||
//import com.tiesheng.poi.pojos.PoiWriteBase;
|
||||
//
|
||||
//public class TestFile implements PoiWriteBase {
|
||||
//
|
||||
//
|
||||
// @ExcelProperty("测试")
|
||||
// private String test;
|
||||
//
|
||||
// public TestFile(String test) {
|
||||
// this.test = test;
|
||||
// }
|
||||
//
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // setter、getter
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// public String getTest() {
|
||||
// return test;
|
||||
// }
|
||||
//
|
||||
// public void setTest(String test) {
|
||||
// this.test = test;
|
||||
// }
|
||||
//}
|
||||
package com.tiesheng.demo.pojos;
|
||||
|
||||
import com.tiesheng.poi.pojos.PoiWriteBase;
|
||||
|
||||
|
||||
public class TestFile extends TestParent implements PoiWriteBase {
|
||||
|
||||
private String name;
|
||||
|
||||
public TestFile(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.tiesheng.demo.pojos;
|
||||
|
||||
import com.tiesheng.annotation.desensitize.Desensitize;
|
||||
import com.tiesheng.poi.pojos.PoiWriteBase;
|
||||
|
||||
|
||||
public class TestParent implements PoiWriteBase {
|
||||
|
||||
private String id;
|
||||
|
||||
@Desensitize()
|
||||
private String test;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// setter、getter
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTest() {
|
||||
return test;
|
||||
}
|
||||
|
||||
public void setTest(String test) {
|
||||
this.test = test;
|
||||
}
|
||||
}
|
||||
28
springboot-ademo/src/main/resources/application-test.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
## Spring配置
|
||||
spring:
|
||||
|
||||
## 数据库配置
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://47.96.30.85:3306/com_tiesheng_web?useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&queryTimeout=5400&allowMultiQueries=true&serverTimezone=GMT%2B8
|
||||
username: com_tiesheng_web
|
||||
password: 4Xo$XheGFc
|
||||
|
||||
platform:
|
||||
wxmp:
|
||||
global:
|
||||
app-id: wxa0343fe519824651
|
||||
app-secret: 776f089ba70bcd66455a7c7893f810b9
|
||||
|
||||
tiesheng:
|
||||
token:
|
||||
test-map:
|
||||
"1111":
|
||||
id: "1111"
|
||||
global:
|
||||
version: 2
|
||||
host: http://localhost:8100
|
||||
aliyun:
|
||||
access-key-id: LTAI5tJtbgBCnTY5eS4SmrTf
|
||||
access-key-secret: JIHqpRUFffCHhXaJEVvWN31WcexWqG
|
||||
sign-name: 阿里云短信测试
|
||||
@@ -1,28 +1,26 @@
|
||||
server:
|
||||
compression:
|
||||
enabled: true
|
||||
port: 8100
|
||||
|
||||
## Spring配置
|
||||
spring:
|
||||
|
||||
## 数据库配置
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://47.96.30.85:3306/com_tiesheng_web?useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&queryTimeout=5400&allowMultiQueries=true&serverTimezone=GMT%2B8
|
||||
username: com_tiesheng_web
|
||||
password: 4Xo$XheGFc
|
||||
|
||||
platform:
|
||||
wxmp:
|
||||
global:
|
||||
app-id: wxa0343fe519824651
|
||||
app-secret: 776f089ba70bcd66455a7c7893f810b9
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 20MB
|
||||
web:
|
||||
resources:
|
||||
static-locations: classpath:/static/,file:static/
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
|
||||
## 日志
|
||||
logging:
|
||||
file:
|
||||
name: runtime/logs/tiesheng.log
|
||||
tiesheng:
|
||||
token:
|
||||
ignores:
|
||||
"1111":
|
||||
id: "1111"
|
||||
global:
|
||||
version: 2
|
||||
host: http://localhost:8080
|
||||
aliyun:
|
||||
access-key-id: LTAI5tJtbgBCnTY5eS4SmrTf
|
||||
access-key-secret: JIHqpRUFffCHhXaJEVvWN31WcexWqG
|
||||
sign-name: 阿里云短信测试
|
||||
ignore-paths:
|
||||
- /test/index
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*{margin:0;padding:0}@font-face{font-family:webfont;font-display:swap;src:url(//at.alicdn.com/t/webfont_enly703pzve.eot);src:url(//at.alicdn.com/t/webfont_enly703pzve.eot#iefix) format("embedded-opentype"),url(//at.alicdn.com/t/webfont_enly703pzve.woff2) format("woff2"),url(//at.alicdn.com/t/webfont_enly703pzve.woff) format("woff"),url(//at.alicdn.com/t/webfont_enly703pzve.ttf) format("truetype"),url(//at.alicdn.com/t/webfont_enly703pzve.svg#NotoSansHans-DemiLight) format("svg")}.web-font{font-family:serif;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.flex[data-v-7ce2b5d6]{display:flex;position:relative;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;word-break:break-all;white-space:normal;flex-shrink:0;-webkit-flex-shrink:0}
|
||||
@@ -0,0 +1 @@
|
||||
.state[data-v-48e36584]{width:5rem;height:auto;position:absolute;right:-2%;bottom:-1%;margin-right:0}.state img[data-v-48e36584]{width:85%;height:75%}.wraps[data-v-48e36584]{width:100%;padding:6px 0}.wraps .item[data-v-48e36584]{background:#fff;margin:6px 12px;padding:8px;line-height:1.8;border-radius:4px;box-shadow:0 2px 4px 0 rgba(0,0,0,.1);border-top:5px solid #5aabff;font-size:15px}.wraps .item .label[data-v-48e36584]{width:76px}.wraps .item .label[data-v-48e36584]:after{content:":"}.wraps .jia[data-v-48e36584],.wraps .meiyou[data-v-48e36584]{width:100%;text-align:center;padding:10px}.wraps .meiyou[data-v-48e36584]{color:grey}[data-v-20482632] .tabTwo .tabTwo_div2 .tabTwo_div2_Time2[data-v-56ab07cd] .van-cell,[data-v-20482632] .tabTwo .tabTwo_div2 .tabTwo_div2_Time[data-v-56ab07cd] .van-cell{box-sizing:border-box;width:100%;padding:3px 0;color:#323233;font-size:13px;line-height:24px;background-color:#f2f5f8;border-radius:5px}[data-v-20482632] [data-v-56ab07cd] .van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:#323233;line-height:inherit;border:0;resize:none;font-size:13px!important}[data-v-20482632] [data-v-56ab07cd] .van-field__label{flex:none;box-sizing:border-box;width:2.3em;margin:0;color:#59adff;white-space:nowrap}[data-v-20482632] .tabTwo .tabTwo_one .tabTwo_div1 .inp[data-v-56ab07cd]{width:100%;padding:0 0;border-radius:10px;outline:none;border:none;font-size:13px;border-radius:5px}[data-v-20482632] .van-cell:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;border:none;transform:scaleY(.5)}.state_vant[data-v-20482632]{width:15rem;padding:0 0}[data-v-20482632] .van-field__label{flex:none;box-sizing:border-box;width:3.3em;color:#59adff;word-wrap:break-word}[data-v-20482632] .van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:#323233;line-height:inherit;text-align:center;border:0;resize:none}.tabTwo[data-v-20482632]{width:100%;height:5.5rem}.tabTwo .tabTwo_one[data-v-20482632]{width:100%;height:2.5rem;font-size:13px;display:flex;justify-content:space-around;padding:0 12px}.tabTwo .tabTwo_one .tabTwo_div2_state[data-v-20482632]{width:5.8rem;height:2.5rem;display:flex;justify-content:space-around}.tabTwo .tabTwo_one .tabTwo_div2_state[data-v-20482632] .van-cell{width:126%;padding:10px 0;color:#323233;font-size:13px;line-height:25px;background-color:#fff;box-sizing:border-box}.tabTwo .tabTwo_one .tabTwo_div1[data-v-20482632]{width:0;height:3rem;text-align:left;display:flex;justify-content:flex-start;align-items:center;flex-grow:1;font-size:13px!important}.tabTwo .tabTwo_one .tabTwo_div1 .inp[data-v-20482632]{width:90%;padding:3px 10px;border-radius:10px;outline:none;border:none;font-size:13px!important}.tabTwo .tabTwo_div2[data-v-20482632]{width:100%;height:3rem;display:flex;padding:8px 10px;box-sizing:border-box;justify-content:space-evenly;align-items:center}.tabTwo .tabTwo_div2 .tabTwo_div2_Time[data-v-20482632]{width:40%}.tabTwo .tabTwo_div2 .tabTwo_div2_Time[data-v-20482632] .van-cell{box-sizing:border-box;width:100%;padding:3px 0;color:#323233;font-size:13px;line-height:24px;background-color:#f2f5f8}.tabTwo .tabTwo_div2 .zhe[data-v-20482632]{width:4%;color:rgba(193,195,196,.6784313725490196)}.tabTwo .tabTwo_div2 .tabTwo_div2_Time2[data-v-20482632]{width:40%}.tabTwo .tabTwo_div2 .tabTwo_div2_Time2[data-v-20482632] .van-cell{box-sizing:border-box;width:100%;padding:3px 0;color:#323233;font-size:13px;line-height:24px;background-color:#f2f5f8}.tabTwoBtn[data-v-20482632]{width:15%;height:90%;margin:0 8px;background-color:#59adff;color:#fff;outline:none;border:none;border-radius:5px}.wrap .btn[data-v-20482632]{width:50px;height:50px;border-radius:50px;outline:none;border:none;background:#58acf2 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAIJJREFUWEdjZBhgwDjA9jOMOmBoh8D///8XgdIQIyNjHLlpiaIQ+P///36oAxxHHTAaAqMhMBoCVA2B////r2JgYBAl11Ac+l4zMjKGocthLQmhRawslR3wGFuRPVoUj4bAaAiMhsCQDwFQkQ1qlGIUscSWohSFALGW4FM36oDREAAAIXhaIRTlu6kAAAAASUVORK5CYII=) no-repeat .5rem .5rem;position:fixed;right:2rem;bottom:3rem}.wrap .skip[data-v-20482632]{width:100vw;height:100vh}.wrap .skip .skip_left[data-v-20482632]{width:70%;height:20vw;margin:6px 0;-o-object-fit:contain;object-fit:contain}
|
||||
@@ -0,0 +1 @@
|
||||
.wrap[data-v-347dc6ff]{width:100vw;height:100vh;position:fixed;top:0;left:0}.wrap .top[data-v-347dc6ff]{width:100vh;height:15vh}.wrap .top img[data-v-347dc6ff]{width:100vw;height:100%}.wrap .content[data-v-347dc6ff]{width:80vw;height:50vh;margin:5rem auto;display:flex;flex-direction:column;justify-content:space-around;align-items:center}.wrap .content img[data-v-347dc6ff]{width:100%;height:60%}.wrap .content h3[data-v-347dc6ff]{color:#666;font-size:18px;font-weight:350}.wrap .bottom[data-v-347dc6ff]{width:100vh;height:15vh;position:fixed;bottom:0;left:0}.wrap .bottom img[data-v-347dc6ff]{width:100vw;height:100%}
|
||||
@@ -0,0 +1 @@
|
||||
.view[data-v-3c038828]{width:100%}.jkmNucleic[data-v-3c038828]{width:100%;margin-top:12px;font-size:14px;color:#fff}.jkmNucleic .header[data-v-3c038828]{background:hsla(0,0%,100%,.4);font-size:13px;padding:4px;line-height:20px!important}.jkmNucleic .body2[data-v-3c038828],.jkmNucleic .body[data-v-3c038828]{padding:6px 4px;white-space:pre-wrap;line-height:20px;height:56px;text-align:center}.jkmNucleic .body2[data-v-3c038828]{line-height:40px;font-size:18px}.jkmNucleic .jkm[data-v-3c038828]{width:0;border-radius:6px;margin-right:6px}.jkmNucleic .nucleic[data-v-3c038828]{border-radius:6px;width:0;margin-left:6px}.xck[data-v-3c038828]{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.vaccinum[data-v-3c038828]{width:100%;border-top:1px solid #ddd;padding-top:12px;margin-top:12px;color:#999;font-size:14px}.vaccinum .va1[data-v-3c038828]{color:#339b68}.wrap[data-v-4c39bc1c]{width:100vw;min-height:100vh;background:#fff;padding-bottom:100px}.header[data-v-4c39bc1c]{height:50vw;position:relative;color:#fff}.header .headerText[data-v-4c39bc1c]{font-size:8vw;margin-top:24px;font-weight:700}.header .bg[data-v-4c39bc1c]{-o-object-fit:cover;object-fit:cover;z-index:0;position:absolute;left:0;top:0;width:100%;height:100%}.content[data-v-4c39bc1c]{padding:12px;border-radius:4px;background:#fff;margin:-48px 24px 12px;box-shadow:0 2px 10px 0 rgba(0,0,0,.25)}.qrcode[data-v-4c39bc1c]{width:200px;height:200px;margin-top:12px}.qrcode .expired[data-v-4c39bc1c]{position:absolute;left:0;top:0;color:red;width:100%;font-size:16px;line-height:32px;font-weight:700;height:100%;align-items:center;justify-content:center;background:#000;opacity:.9}.time[data-v-4c39bc1c]{margin-top:12px;color:#b5b5b5;display:flex;align-items:center;justify-content:center}.tips[data-v-4c39bc1c]{color:#555;line-height:1.6;font-size:14px;margin:0 36px;text-align:center;white-space:pre-wrap}.tips pre[data-v-4c39bc1c]{white-space:pre-wrap}.primaryColor[data-v-4c39bc1c]{color:#59adff}
|
||||
@@ -0,0 +1 @@
|
||||
.state[data-v-48e36584]{width:5rem;height:auto;position:absolute;right:-2%;bottom:-1%;margin-right:0}.state img[data-v-48e36584]{width:85%;height:75%}.wraps[data-v-48e36584]{width:100%;padding:6px 0}.wraps .item[data-v-48e36584]{background:#fff;margin:6px 12px;padding:8px;line-height:1.8;border-radius:4px;box-shadow:0 2px 4px 0 rgba(0,0,0,.1);border-top:5px solid #5aabff;font-size:15px}.wraps .item .label[data-v-48e36584]{width:76px}.wraps .item .label[data-v-48e36584]:after{content:":"}.wraps .jia[data-v-48e36584],.wraps .meiyou[data-v-48e36584]{width:100%;text-align:center;padding:10px}.wraps .meiyou[data-v-48e36584]{color:grey}.tabTwo[data-v-dd0e5654]{width:100%;margin-top:12px;padding:0 12px;font-size:14px;display:flex;align-items:center}.tabTwo .tabTwo_div1[data-v-dd0e5654]{width:0;flex-grow:1;height:32px;display:flex;font-size:13px!important}.tabTwo .tabTwo_div1 .inp[data-v-dd0e5654]{width:100%;height:100%;padding:0 12px;border-radius:4px;outline:none;border:none;font-size:13px!important;background-color:#f7f8fa}.tabTwo .tabTwo_div2[data-v-dd0e5654]{width:48px;background-color:#59adff;color:#fff;height:32px;line-height:32px;text-align:center;border-radius:4px;margin-left:6px}
|
||||
@@ -0,0 +1 @@
|
||||
input[data-v-35195103]{margin:24px 48px;width:calc(100% - 96px);line-height:32px;border:1px solid #555;border-radius:2px;padding:0 8px;font-size:15px}.skip[data-v-f9824790]{width:100vw}.skip .skip_left[data-v-f9824790]{width:44%;height:23vw;margin:.6rem .5rem .6rem 1rem;background:url(link_1.bea27bf1.png);background-size:100% 100%;border-radius:10px;padding:10px;box-sizing:border-box;display:flex;align-items:center}.skip .skip_left img[data-v-f9824790]{width:24%;height:70%;flex-grow:2}.skip .skip_left div[data-v-f9824790]{width:50%;flex-grow:3}.skip .skip_left div .p1[data-v-f9824790]{color:#fff;font-size:18px;font-weight:400}.skip .skip_left div .p2[data-v-f9824790]{color:hsla(0,0%,100%,.2901960784313726);font-size:12px;font-weight:400}.skip .skip_right[data-v-f9824790]{width:44%;height:23vw;margin:.6rem 1rem .6rem .5rem;background:url(message_1.24803f90.png);background-size:100% 100%;border-radius:10px;padding:10px;box-sizing:border-box;display:flex;align-items:center}.skip .skip_right img[data-v-f9824790]{width:24%;height:70%;flex-grow:2}.skip .skip_right div[data-v-f9824790]{width:50%;flex-grow:3}.skip .skip_right div .p1[data-v-f9824790]{color:#fff;font-size:18px;font-weight:400}.skip .skip_right div .p2[data-v-f9824790]{color:hsla(0,0%,100%,.2901960784313726);font-size:12px;font-weight:400}@font-face{font-family:webfont;font-display:swap;src:url(//at.alicdn.com/t/webfont_0ojzn4lmety.eot);src:url(//at.alicdn.com/t/webfont_0ojzn4lmety.eot#iefix) format("embedded-opentype"),url(//at.alicdn.com/t/webfont_0ojzn4lmety.woff2) format("woff2"),url(//at.alicdn.com/t/webfont_0ojzn4lmety.woff) format("woff"),url(//at.alicdn.com/t/webfont_0ojzn4lmety.ttf) format("truetype"),url(//at.alicdn.com/t/webfont_0ojzn4lmety.svg#Alibaba-PuHuiTi-Regular) format("svg")}[data-v-f9824790] .van-badge{display:inline-block;box-sizing:border-box;min-width:22px;padding:0 3px;margin-bottom:1rem;color:#fff;font-weight:500;font-size:12px;line-height:1.6;text-align:center;background-color:#ee0a24;border:1px solid #fff;border-radius:1rem}[data-v-f9824790] .van-badge--fixed{position:absolute;top:0;right:-10px;transform:translate(50%,-50%);transform-origin:100%}.home[data-v-f9824790]{width:100vw;height:100vh;background:#fff;overflow:hidden}a[data-v-f9824790]{text-decoration:none;color:#333}.router-link-exact-active[data-v-f9824790]{color:#58acf2}.tabs[data-v-f9824790]{width:100vw;background:#f2f2f2;padding:6px 0}.tabItem[data-v-f9824790]{flex-grow:1;width:0;font-size:15px;font-weight:700}.content[data-v-f9824790]{height:0;overflow:auto;flex-grow:1}
|
||||
@@ -0,0 +1 @@
|
||||
.bg[data-v-742d767c]{min-height:100vh;position:relative}.bg .beijing[data-v-742d767c]{width:100%;position:absolute;top:0;left:0;z-index:1}.bg .content[data-v-742d767c]{z-index:2;width:100vw;min-height:100vh}.bg .content .log_logo[data-v-742d767c]{width:calc(100% - 48px);max-height:100px;margin:24px;-o-object-fit:contain;object-fit:contain}.bg .content .kuang[data-v-742d767c]{width:calc(100vw - 48px);background:#fff;box-shadow:0 0 10px 0 rgba(0,0,0,.1);border-radius:30px;padding:15px 20px;box-sizing:border-box;margin:10vh auto}.bg .content .kuang .goBtn[data-v-742d767c]{width:calc(100% - 48px);height:60px;background:#59adff;border-radius:30px;color:#fff}.bg .content .kuang .inpWrap[data-v-742d767c]{width:calc(100% - 48px);margin:24px;height:60px;background:#f3f5fc;box-shadow:inset 0 0 5px 0 rgba(151,171,184,.1);border-radius:30px;padding:10px;box-sizing:border-box}.bg .content .kuang .inpWrap img[data-v-742d767c]{width:12px;height:17px;-o-object-fit:cover;object-fit:cover;margin:0 10px}.bg .content .kuang .inpWrap input[data-v-742d767c]{width:100%;height:100%;border:none;outline:none;background:#f3f5fc}.bg .content .kuang .xian[data-v-742d767c]{width:100%;height:1px;margin:20px 0;border:1px solid;-o-border-image:linear-gradient(270deg,rgba(89,173,255,0),#1890ff,rgba(24,144,255,0)) 1 1;border-image:linear-gradient(270deg,rgba(89,173,255,0),#1890ff,rgba(24,144,255,0)) 1 1}.bg .content .kuang .btns[data-v-742d767c]{width:calc(100% - 48px)}.bg .content .kuang .btns .fill[data-v-742d767c]{width:100%;height:60px;background:#49ccd9;border-radius:16px;margin-bottom:20px}.bg .content .kuang .btns .fill img[data-v-742d767c]{width:21px;height:21px;margin:0 5px;-o-object-fit:contain;object-fit:contain}.bg .content .kuang .btns .fill div[data-v-742d767c]{font-size:16px;font-family:AlibabaPuHuiTi-Medium\, AlibabaPuHuiTi;font-weight:500;color:#fff}.modalConten[data-v-742d767c]{height:400px;overflow-y:auto;padding:5px 16px;box-sizing:border-box;white-space:pre-line}.modalBtn[data-v-742d767c]{width:80%;height:40px;text-align:center;line-height:30px;background-color:#59adff;color:#fff;margin:20px 0 10px 0;border-radius:25px;border:none;outline:none}
|
||||
@@ -0,0 +1 @@
|
||||
.succeed[data-v-bfc49e60]{background-color:#fff}.succeed .succeed_box[data-v-bfc49e60]{width:100vw;padding:20vw 10vw;text-align:center;background-color:#21c7ff;color:#fff}.succeed .succeed_box .chenggong[data-v-bfc49e60]{width:16vw;height:16vw;margin-bottom:4vw}.succeed .succeed_box .shadowBg[data-v-bfc49e60]{width:100vw;position:absolute;-o-object-fit:cover;object-fit:cover;height:20vw;bottom:0;left:0}.succeed .succeed_btn[data-v-bfc49e60]{width:50vw;margin:5rem auto}.succeed .succeed_btn button[data-v-bfc49e60]{width:100%;height:3rem;color:#fff;border-radius:4px;border:none;background-color:#66c0fd}
|
||||
@@ -0,0 +1 @@
|
||||
.wrap[data-v-347dc6ff]{width:100vw;height:100vh;position:fixed;top:0;left:0}.wrap .top[data-v-347dc6ff]{width:100vh;height:15vh}.wrap .top img[data-v-347dc6ff]{width:100vw;height:100%}.wrap .content[data-v-347dc6ff]{width:80vw;height:50vh;margin:5rem auto;display:flex;flex-direction:column;justify-content:space-around;align-items:center}.wrap .content img[data-v-347dc6ff]{width:100%;height:60%}.wrap .content h3[data-v-347dc6ff]{color:#666;font-size:18px;font-weight:350}.wrap .bottom[data-v-347dc6ff]{width:100vh;height:15vh;position:fixed;bottom:0;left:0}.wrap .bottom img[data-v-347dc6ff]{width:100vw;height:100%}
|
||||
@@ -0,0 +1 @@
|
||||
.colorHui[data-v-e807bdea]{color:#999}[data-v-e807bdea] .van-step__title--active{color:#323233!important}.daiShenHe[data-v-e807bdea]{width:90vw;display:flex;align-items:center}.daiShenHe .daiShenHe_name[data-v-e807bdea]{display:flex;font-size:12px}.daiShenHe .daiShenHe_name div[data-v-e807bdea]{background-color:#90c95e;color:#fff;border-radius:50%;width:48px;height:48px;line-height:48px;text-align:center;transform:scale(.8);box-sizing:border-box}.liucheng[data-v-e807bdea]{width:100%;margin-left:-1.2rem}.zanwei[data-v-e807bdea]{width:8%}.border[data-v-e807bdea]{width:100%;border-top:10px solid #f2f5f8;font-size:15px}.border .zhu[data-v-e807bdea]{background-color:#59aefc;width:150px;height:30px;line-height:30px;display:flex;justify-content:center;margin:20px auto;color:#fff;border-radius:15px;border:none;outline:none}.van-step__icon--finish[data-v-e807bdea],.van-step__title--active[data-v-e807bdea],.van-step__title--finish[data-v-e807bdea],[data-v-e807bdea] .van-step__icon--active{position:relative;color:#59aefc;z-index:1000}.van-step--finish .van-step__line[data-v-e807bdea],[data-v-e807bdea] .van-step--finish .van-step__circle{position:relative;background-color:#59aefc;z-index:1000}[data-v-e807bdea] .van-step__line{border-left:1px dashed #999;background-color:#fff;color:#59aefc}[data-v-e807bdea] .van-step__title--active{color:#59aefc}.wrap[data-v-e807bdea]{height:100%;line-height:1.8;padding:12px 0;color:#000;min-height:100vh}.xiangguan[data-v-e807bdea]{background-color:#59aefc;width:150px;margin:0 auto;height:30px;line-height:30px;color:#fff;border-radius:15px;border:none;outline:none}.itemDivider[data-v-e807bdea]{border-bottom:1px solid #eee;padding:8px 12px;color:#3a3a3a;font-size:15px}.itemDivider .label[data-v-e807bdea]{width:96px}.itemDivider img[data-v-e807bdea]{width:20vw;height:20vw;-o-object-fit:cover;object-fit:cover}.footer[data-v-e807bdea]{z-index:100;width:100%;left:0;padding:0 12px;background:#fff;height:76px;color:#fff;border-top:1px solid #ddd}.footer button[data-v-e807bdea]{width:0;flex-grow:1;height:48px;border-radius:4px;border:none;margin:0 6px}.smsOk[data-v-e807bdea]{color:#999}.smsOk[data-v-e807bdea],.smsOkResend[data-v-e807bdea]{font-size:12px;line-height:24px;margin-left:8px;transform:scale(.9)}.smsOkResend[data-v-e807bdea]{color:#999;background:#5aabff;color:#fff;border-radius:4px;padding:0 6px}
|
||||
@@ -0,0 +1 @@
|
||||
.wrap[data-v-347dc6ff]{width:100vw;height:100vh;position:fixed;top:0;left:0}.wrap .top[data-v-347dc6ff]{width:100vh;height:15vh}.wrap .top img[data-v-347dc6ff]{width:100vw;height:100%}.wrap .content[data-v-347dc6ff]{width:80vw;height:50vh;margin:5rem auto;display:flex;flex-direction:column;justify-content:space-around;align-items:center}.wrap .content img[data-v-347dc6ff]{width:100%;height:60%}.wrap .content h3[data-v-347dc6ff]{color:#666;font-size:18px;font-weight:350}.wrap .bottom[data-v-347dc6ff]{width:100vh;height:15vh;position:fixed;bottom:0;left:0}.wrap .bottom img[data-v-347dc6ff]{width:100vw;height:100%}
|
||||
@@ -0,0 +1 @@
|
||||
.state[data-v-48e36584]{width:5rem;height:auto;position:absolute;right:-2%;bottom:-1%;margin-right:0}.state img[data-v-48e36584]{width:85%;height:75%}.wraps[data-v-48e36584]{width:100%;padding:6px 0}.wraps .item[data-v-48e36584]{background:#fff;margin:6px 12px;padding:8px;line-height:1.8;border-radius:4px;box-shadow:0 2px 4px 0 rgba(0,0,0,.1);border-top:5px solid #5aabff;font-size:15px}.wraps .item .label[data-v-48e36584]{width:76px}.wraps .item .label[data-v-48e36584]:after{content:":"}.wraps .jia[data-v-48e36584],.wraps .meiyou[data-v-48e36584]{width:100%;text-align:center;padding:10px}.wraps .meiyou[data-v-48e36584]{color:grey}.skip_left[data-v-2b65ce1d]{width:100%;height:23vw;margin:6px 0;background:url(message_1.24803f90.png);background-size:100% 100%;border-radius:10px;padding:10px;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end}.skip_left img[data-v-2b65ce1d]{width:16vw;height:16vw;display:flex;align-items:flex-end}.skip_left div[data-v-2b65ce1d]{width:75%;margin-left:5vw}.skip_left div .p1[data-v-2b65ce1d]{color:#fff;font-size:18px;font-weight:400}.skip_left div .p2[data-v-2b65ce1d]{color:hsla(0,0%,100%,.2901960784313726);font-size:12px;font-weight:400}.skip_right[data-v-2b65ce1d]{width:50%;height:23vw;margin:6px 0;background:url(message_1.24803f90.png);background-size:100% 100%;border-radius:10px;padding:10px;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end}.skip_right img[data-v-2b65ce1d]{width:16vw;height:16vw;display:flex;align-items:flex-end}.skip_right div[data-v-2b65ce1d]{width:75%;margin-left:5vw}.skip_right div .p1[data-v-2b65ce1d]{color:#fff;font-size:18px;font-weight:400}.skip_right div .p2[data-v-2b65ce1d]{color:hsla(0,0%,100%,.2901960784313726);font-size:12px;font-weight:400}@font-face{font-family:webfont;font-display:swap;src:url(//at.alicdn.com/t/webfont_0ojzn4lmety.eot);src:url(//at.alicdn.com/t/webfont_0ojzn4lmety.eot#iefix) format("embedded-opentype"),url(//at.alicdn.com/t/webfont_0ojzn4lmety.woff2) format("woff2"),url(//at.alicdn.com/t/webfont_0ojzn4lmety.woff) format("woff"),url(//at.alicdn.com/t/webfont_0ojzn4lmety.ttf) format("truetype"),url(//at.alicdn.com/t/webfont_0ojzn4lmety.svg#Alibaba-PuHuiTi-Regular) format("svg")}.item[data-v-2b65ce1d]{background:#fff;margin:6px 12px;padding:8px;line-height:1.8;border-radius:4px;box-shadow:0 2px 4px 0 rgba(0,0,0,.1);border-top:5px solid #5aabff}.item .hui[data-v-2b65ce1d]{color:grey}
|
||||
@@ -0,0 +1 @@
|
||||
.state[data-v-48e36584]{width:5rem;height:auto;position:absolute;right:-2%;bottom:-1%;margin-right:0}.state img[data-v-48e36584]{width:85%;height:75%}.wraps[data-v-48e36584]{width:100%;padding:6px 0}.wraps .item[data-v-48e36584]{background:#fff;margin:6px 12px;padding:8px;line-height:1.8;border-radius:4px;box-shadow:0 2px 4px 0 rgba(0,0,0,.1);border-top:5px solid #5aabff;font-size:15px}.wraps .item .label[data-v-48e36584]{width:76px}.wraps .item .label[data-v-48e36584]:after{content:":"}.wraps .jia[data-v-48e36584],.wraps .meiyou[data-v-48e36584]{width:100%;text-align:center;padding:10px}.wraps .meiyou[data-v-48e36584]{color:grey}.tabTwo[data-v-36552c82]{width:100%;margin-top:12px;padding:0 12px;font-size:14px;display:flex;align-items:center}.tabTwo .tabTwo_div1[data-v-36552c82]{width:0;flex-grow:1;height:32px;display:flex;font-size:13px!important}.tabTwo .tabTwo_div1 .inp[data-v-36552c82]{width:100%;height:100%;padding:0 12px;border-radius:4px;outline:none;border:none;font-size:13px!important;background-color:#f7f8fa}.tabTwo .tabTwo_div2[data-v-36552c82]{width:48px;background-color:#59adff;color:#fff;height:32px;line-height:32px;text-align:center;border-radius:4px;margin-left:6px}
|
||||
@@ -0,0 +1 @@
|
||||
[data-v-667c97f7] .van-field__control{display:block;box-sizing:border-box;width:80%;min-width:0;color:#323233;background-color:transparent;border:0;resize:none;margin-left:8%;text-align:left}.reson[data-v-667c97f7]{display:flex;flex-direction:column!important;color:#646566}.reson .van-cell__value[data-v-667c97f7]{text-align:left}.notice[data-v-7d4cc171]{position:fixed;width:100%;left:0;top:0;z-index:100}.holder[data-v-7d4cc171]{height:40px}[data-v-3d45a78b] .van-field__body input{padding:0 6px}[data-v-3d45a78b] .reson_div[data-v-cb3ced6c]{border-top:10px solid #f2f5f8;border-bottom:10px solid #f2f5f8;padding:10px 0;color:#646566;font-size:14px;text-align:center}[data-v-3d45a78b] .van-field--disabled .van-field__label{color:#646566!important}[data-v-3d45a78b] .van-cell--required span:before{content:""!important}[data-v-3d45a78b] .van-cell--required span:after{position:absolute;right:-10px;color:#ee0a24;font-size:14px;content:"*"}textarea[data-v-3d45a78b]::-webkit-input-placeholder{color:#d2ced0;font-size:14px}i[data-v-3d45a78b]{color:red}.header[data-v-3d45a78b]{width:99%;height:auto;margin:0 auto;padding:10px;box-sizing:border-box}.header img[data-v-3d45a78b]{width:calc(100% - 48px);max-height:100px;margin:1px;-o-object-fit:contain;object-fit:contain}[data-v-3d45a78b] .van-cell__value{text-align:left}[data-v-3d45a78b] .van-field__control{display:block;box-sizing:border-box;width:100%;margin:0;color:#323233;background-color:transparent;border:0;resize:none;text-align:left;padding:0}.reson_div[data-v-3d45a78b]{border-top:10px solid #f2f5f8;border-bottom:10px solid #f2f5f8;padding:10px 1px!important;color:#646566;font-size:14px}.btns[data-v-3d45a78b]{width:auto;height:60px;display:flex;justify-content:flex-end;align-items:flex-end}.pays[data-v-3d45a78b]{margin:8px auto;border-radius:10px;box-sizing:border-box}.paysAdd[data-v-3d45a78b]{width:90%;height:40px;color:#59adff;text-align:center;line-height:40px;margin:0 auto}.payReduce[data-v-3d45a78b]{width:100%;border-top:20px solid #f2f5f8;padding:0 0 4px 16px;display:flex;background:#f2f5f8;justify-content:space-between;align-items:center}.payReduce button[data-v-3d45a78b]{color:#e36969;border:none;padding:0 16px;background-color:#f2f5f8}[data-v-3d45a78b] .van-cell--required:before{content:""}[data-v-3d45a78b] .van-cell--required .van-cell__title span{position:relative}[data-v-3d45a78b] .van-cell--required .van-cell__title span:before{position:absolute;right:-8px;color:#ee0a24;font-size:14px;content:"*"}.reson[data-v-3d45a78b]{display:flex;flex-direction:column!important;color:#646566}.addPay[data-v-3d45a78b]{width:100%;margin:10px auto;border-radius:10px;padding:0;box-sizing:border-box}.button[data-v-3d45a78b]{width:10rem;height:2rem;display:block;margin:1rem auto}.van-nav-bar .van-icon[data-v-3d45a78b]{color:#000}.submit[data-v-3d45a78b]{width:calc(100vw - 24px);height:3rem;color:#fff;border-radius:3px;margin:14px 12px;outline:none}.van-action-sheet[data-v-3d45a78b]{display:flex;flex-direction:column;max-height:40%;overflow:hidden;color:#323233}
|
||||
BIN
springboot-ademo/src/main/resources/mobile/0.0.13/favicon.ico
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
138
springboot-ademo/src/main/resources/mobile/0.0.13/index.html
Normal file
@@ -0,0 +1,138 @@
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta content="IE=edge" http-equiv="X-UA-Compatible"><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" name="viewport"><link href="favicon.ico" rel="icon"><title>校外人员入校审核</title><style>html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
}</style><style>.loading {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
font-size: 13px;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.loading-tips {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
color: #3a3a3a;
|
||||
}
|
||||
|
||||
.loading-container {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
animation: rotate-move 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.loading-container-dot {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 50%;
|
||||
background-color: #000;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.dot-3 {
|
||||
background-color: #f74d75;
|
||||
animation: dot-3-move 2s ease infinite;
|
||||
}
|
||||
|
||||
.dot-2 {
|
||||
background-color: #10beae;
|
||||
animation: dot-2-move 2s ease infinite;
|
||||
}
|
||||
|
||||
.dot-1 {
|
||||
background-color: #ffe386;
|
||||
animation: dot-1-move 2s ease infinite;
|
||||
}
|
||||
|
||||
@keyframes dot-3-move {
|
||||
20% {
|
||||
transform: scale(1)
|
||||
}
|
||||
|
||||
45% {
|
||||
transform: translateY(-5px) scale(.6)
|
||||
}
|
||||
|
||||
60% {
|
||||
transform: translateY(-20px) scale(.6)
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: translateY(-20px) scale(.6)
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(0px) scale(1)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dot-2-move {
|
||||
20% {
|
||||
transform: scale(1)
|
||||
}
|
||||
|
||||
45% {
|
||||
transform: translate(-4px, 3px) scale(.6)
|
||||
}
|
||||
|
||||
60% {
|
||||
transform: translate(-20px, 15px) scale(.6)
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: translate(-20px, 15px) scale(.6)
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(0px) scale(1)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dot-1-move {
|
||||
20% {
|
||||
transform: scale(1)
|
||||
}
|
||||
|
||||
45% {
|
||||
transform: translate(4px, 3px) scale(.6)
|
||||
}
|
||||
|
||||
60% {
|
||||
transform: translate(20px, 15px) scale(.6)
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: translate(20px, 15px) scale(.6)
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(0px) scale(1)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotate-move {
|
||||
55% {
|
||||
transform: rotate(0deg)
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: rotate(360deg)
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg)
|
||||
}
|
||||
}</style><link href="css/chunk-042d5992.89adb41e.css" rel="prefetch"><link href="css/chunk-0531775c.5b0eefaf.css" rel="prefetch"><link href="css/chunk-0648c3ef.0ff9539c.css" rel="prefetch"><link href="css/chunk-188e3fa4.275399a9.css" rel="prefetch"><link href="css/chunk-26937ed4.b3bb8164.css" rel="prefetch"><link href="css/chunk-27755411.65febfb3.css" rel="prefetch"><link href="css/chunk-300e725c.944af6a2.css" rel="prefetch"><link href="css/chunk-31e07dff.5b0eefaf.css" rel="prefetch"><link href="css/chunk-4d1974da.c70f0eba.css" rel="prefetch"><link href="css/chunk-4eb60a5d.5b0eefaf.css" rel="prefetch"><link href="css/chunk-72a73cc2.23c45673.css" rel="prefetch"><link href="css/chunk-dd7f1184.c4031c36.css" rel="prefetch"><link href="css/chunk-e9950686.60793d7d.css" rel="prefetch"><link href="js/chunk-042d5992.b340b18c.js" rel="prefetch"><link href="js/chunk-0531775c.e68fe2d1.js" rel="prefetch"><link href="js/chunk-0648c3ef.8397ad46.js" rel="prefetch"><link href="js/chunk-188e3fa4.71744b51.js" rel="prefetch"><link href="js/chunk-26937ed4.99cdb24b.js" rel="prefetch"><link href="js/chunk-26b05676.8cad4b43.js" rel="prefetch"><link href="js/chunk-27755411.62b9ce63.js" rel="prefetch"><link href="js/chunk-2d0b2ecb.1abd02a2.js" rel="prefetch"><link href="js/chunk-300e725c.fc2456fa.js" rel="prefetch"><link href="js/chunk-31e07dff.c267db1d.js" rel="prefetch"><link href="js/chunk-364cf210.c3e2fbd0.js" rel="prefetch"><link href="js/chunk-4bdf2c4e.fcc723c1.js" rel="prefetch"><link href="js/chunk-4d1974da.66c2525b.js" rel="prefetch"><link href="js/chunk-4eb60a5d.0875be6e.js" rel="prefetch"><link href="js/chunk-72a73cc2.0d7368e1.js" rel="prefetch"><link href="js/chunk-dd7f1184.fbeaa819.js" rel="prefetch"><link href="js/chunk-e9950686.f3e29c04.js" rel="prefetch"><link href="css/app.722d931f.css" rel="preload" as="style"><link href="css/chunk-vendors.eda94bcc.css" rel="preload" as="style"><link href="js/app.fdc7fe9d.js" rel="preload" as="script"><link href="js/chunk-vendors.335d9dbf.js" rel="preload" as="script"><link href="css/chunk-vendors.eda94bcc.css" rel="stylesheet"><link href="css/app.722d931f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but faqi doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="loading/loading.js"></script><script src="js/chunk-vendors.335d9dbf.js"></script><script src="js/app.fdc7fe9d.js"></script></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0531775c"],{"1fcb":function(t,o,s){"use strict";s.r(o);var n=function(){var t=this,o=t.$createElement,n=t._self._c||o;return n("Result",[n("div",{staticClass:"top",attrs:{slot:"top"},slot:"top"},[n("img",{attrs:{src:s("2846"),alt:""}})]),n("div",{staticClass:"content",attrs:{slot:"content"},slot:"content"},[n("img",{attrs:{src:s("ed77"),alt:""}}),n("h3",[t._v("您的审核未通过")])]),n("div",{staticClass:"bottom",attrs:{slot:"bottom"},slot:"bottom"},[n("img",{attrs:{slot:"bottom",src:s("3e6d"),alt:""},slot:"bottom"})])])},c=[],e=s("ffa4"),a={components:{Result:e["a"]}},i=a,l=s("2877"),r=Object(l["a"])(i,n,c,!1,null,"0b5cfe32",null);o["default"]=r.exports},2846:function(t,o,s){t.exports=s.p+"img/top.9905f564.png"},"3e6d":function(t,o,s){t.exports=s.p+"img/bottom.784753ac.png"},cb5f:function(t,o,s){"use strict";s("ceb1")},ceb1:function(t,o,s){},ed77:function(t,o,s){t.exports=s.p+"img/content.96f77c79.png"},ffa4:function(t,o,s){"use strict";var n=function(){var t=this,o=t.$createElement,s=t._self._c||o;return s("div",{staticClass:"wrap"},[t._t("top"),t._t("content"),t._t("bottom")],2)},c=[],e={},a=e,i=(s("cb5f"),s("2877")),l=Object(i["a"])(a,n,c,!1,null,"347dc6ff",null);o["a"]=l.exports}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b2ecb"],{"25d6":function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("router-view")},c=[],u={name:"BasicLayout"},r=u,o=t("2877"),s=Object(o["a"])(r,a,c,!1,null,"2eabe62e",null);n["default"]=s.exports}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-300e725c"],{"4fcf":function(t,c,o){"use strict";var e=o("906c"),n=o("a18c"),i=function(t,c){n["a"].push({path:"/record/detail",query:{id:t,num:c}})},s=function(){n["a"].push({path:"/"})},u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;n["a"].go(t)},a=function(){n["a"].push({path:"/record/successful"})},r=function(){n["a"].push({path:"/record/succeed"})},f=function(t){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"phone",o={source:c};e["a"].isEmpty(t)||(o.recordId=t),n["a"].push({path:"/record/apply",query:o})},p=function(t){e["a"].isEmpty(t)?s():i(t)},l={login:function(){n["a"].push({path:"/visitor/login"})},record:function(){n["a"].push({path:"/visitor/record"})},result:function(t){n["a"].push({path:"/visitor/result",query:{id:t}})}};c["a"]={Visitor:l,goDetail:i,goHome:s,goBack:u,goRecordSuccessful:a,goRecordSucceed:r,goRecordApply:f,homeDetail:p}},9707:function(t,c,o){},c94f:function(t,c,o){t.exports=o.p+"img/payment.64b9ec15.png"},d108:function(t,c,o){"use strict";o("9707")},f017:function(t,c,o){"use strict";o.r(c);var e=function(){var t=this,c=t.$createElement,e=t._self._c||c;return e("flex",{staticClass:"succeed",attrs:{direction:"column"}},[e("flex",{staticClass:"succeed_box",attrs:{"align-items":"center",direction:"column",justify:"center"}},[e("img",{staticClass:"chenggong",attrs:{alt:"",src:o("c94f")}}),e("h2",[t._v("提交成功")]),e("flex",[t._v("您的入校申请已提交,审核通过后您将收到短信通知,请注意查收。")])],1),e("div",{staticClass:"succeed_btn"},[e("button",{on:{click:t.goVisitorLogin}},[t._v("去查看审核进度")])])],1)},n=[],i=o("4fcf"),s={methods:{goVisitorLogin:function(){i["a"].goBack(-2)}}},u=s,a=(o("d108"),o("2877")),r=Object(a["a"])(u,e,n,!1,null,"bfc49e60",null);c["default"]=r.exports}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-31e07dff"],{"63f8":function(t,o,s){t.exports=s.p+"img/top.70166250.png"},cb5f:function(t,o,s){"use strict";s("ceb1")},ceb1:function(t,o,s){},d4c5:function(t,o,s){"use strict";s.r(o);var n=function(){var t=this,o=t.$createElement,n=t._self._c||o;return n("Result",[n("div",{staticClass:"top",attrs:{slot:"top"},slot:"top"},[n("img",{attrs:{src:s("63f8"),alt:""}})]),n("div",{staticClass:"content",attrs:{slot:"content"},slot:"content"},[n("img",{attrs:{src:s("f85a"),alt:""}}),n("h3",[t._v("您已提交过记录,请等待审核通过")])]),n("div",{staticClass:"bottom",attrs:{slot:"bottom"},slot:"bottom"},[n("img",{attrs:{slot:"bottom",src:s("e38a"),alt:""},slot:"bottom"})])])},e=[],c=s("ffa4"),a={components:{Result:c["a"]}},i=a,l=s("2877"),r=Object(l["a"])(i,n,e,!1,null,"2996a060",null);o["default"]=r.exports},e38a:function(t,o,s){t.exports=s.p+"img/bottom.2e5666e8.png"},f85a:function(t,o,s){t.exports=s.p+"img/content.6ed9ad22.png"},ffa4:function(t,o,s){"use strict";var n=function(){var t=this,o=t.$createElement,s=t._self._c||o;return s("div",{staticClass:"wrap"},[t._t("top"),t._t("content"),t._t("bottom")],2)},e=[],c={},a=c,i=(s("cb5f"),s("2877")),l=Object(i["a"])(a,n,e,!1,null,"347dc6ff",null);o["a"]=l.exports}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4eb60a5d"],{"401c":function(t,o,s){t.exports=s.p+"img/404.aae0b83c.png"},"757e":function(t,o,s){t.exports=s.p+"img/top.ef87bb54.png"},cb5f:function(t,o,s){"use strict";s("ceb1")},ceb1:function(t,o,s){},dc93:function(t,o,s){t.exports=s.p+"img/bottom.6eba07d4.png"},f173:function(t,o,s){"use strict";s.r(o);var n=function(){var t=this,o=t.$createElement,n=t._self._c||o;return n("Result",[n("div",{staticClass:"top",attrs:{slot:"top"},slot:"top"},[n("img",{attrs:{src:s("dc93"),alt:""}})]),n("div",{staticClass:"content",attrs:{slot:"content"},slot:"content"},[n("img",{attrs:{src:s("401c"),alt:""}}),n("h3",[t._v("页面出错了")])]),n("div",{staticClass:"bottom",attrs:{slot:"bottom"},slot:"bottom"},[n("img",{attrs:{slot:"bottom",src:s("757e"),alt:""},slot:"bottom"})])])},c=[],e=s("ffa4"),a={components:{Result:e["a"]}},i=a,l=s("2877"),r=Object(l["a"])(i,n,c,!1,null,"340221be",null);o["default"]=r.exports},ffa4:function(t,o,s){"use strict";var n=function(){var t=this,o=t.$createElement,s=t._self._c||o;return s("div",{staticClass:"wrap"},[t._t("top"),t._t("content"),t._t("bottom")],2)},c=[],e={},a=e,i=(s("cb5f"),s("2877")),l=Object(i["a"])(a,n,c,!1,null,"347dc6ff",null);o["a"]=l.exports}}]);
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* 倒计时10s中提醒用户
|
||||
*/
|
||||
function reloadTips() {
|
||||
setTimeout(() => {
|
||||
let ele = document.getElementById("loading-tips");
|
||||
if (ele) {
|
||||
ele.innerHTML = "加载时间过长,请检查网络或退出重试"
|
||||
}
|
||||
}, 10 * 1000);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示加载框
|
||||
*/
|
||||
function showLoading() {
|
||||
var loading = " <div class=\"loading\">\n" +
|
||||
" <div class=\"loading-container\">\n" +
|
||||
" <div class=\"loading-container-dot dot-1\"></div>\n" +
|
||||
" <div class=\"loading-container-dot dot-2\"></div>\n" +
|
||||
" <div class=\"loading-container-dot dot-3\"></div>\n" +
|
||||
" </div>\n" +
|
||||
" <div id='loading-tips' class=\"loading-tips\"> </div>\n" +
|
||||
" </div>";
|
||||
var root = document.getElementById("app");
|
||||
root.innerHTML = loading;
|
||||
|
||||
reloadTips();
|
||||
}
|
||||
|
||||
showLoading();
|
||||
17
springboot-ademo/src/main/resources/mobile/0.0.4/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
|
||||
<meta
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
|
||||
name="viewport"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,37 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
|
||||
<meta
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
|
||||
name="viewport"
|
||||
/>
|
||||
<title>钉钉授权</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="dingtalk.open.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
dd.runtime.permission.requestAuthCode({
|
||||
corpId: getQueryString("corpId"),
|
||||
onSuccess: function (result) {
|
||||
let search = window.location.search + "&code=" + result.code;
|
||||
window.location.href = "/auth/ding/oauth2/" + getQueryString("service") + search;
|
||||
},
|
||||
onFail: function (err) {
|
||||
window.location.href = "./error.html?message=" + JSON.stringify(err);
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,37 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
|
||||
<meta
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
|
||||
name="viewport"
|
||||
/>
|
||||
<title>钉钉授权</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="dingtalk.open.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
dd.runtime.permission.requestAuthCode({
|
||||
corpId: getQueryString("corpId"),
|
||||
onSuccess: function (result) {
|
||||
let search = window.location.search + "&code=" + result.code;
|
||||
window.location.href = "/auth/ding/oauth2/" + getQueryString("service") + search;
|
||||
},
|
||||
onFail: function (err) {
|
||||
window.location.href = "./error.html?message=" + JSON.stringify(err);
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,9 +4,9 @@
|
||||
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>
|
||||
<parent>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-annotation</artifactId>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.tiesheng.annotation.desensitize;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Desensitize {
|
||||
|
||||
int prefix() default 1;
|
||||
|
||||
int suffix() default 1;
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.tiesheng.annotation.encrypt;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@Target({ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface EncryptedRespBody {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.tiesheng.annotation.operation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface OperationIgnore {
|
||||
|
||||
}
|
||||
@@ -21,4 +21,12 @@ public @interface OperationLog {
|
||||
*/
|
||||
String insertKey() default "";
|
||||
|
||||
|
||||
/**
|
||||
* 需要脱敏的字段
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String[] desensitize() default {};
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.lang.annotation.*;
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Target({ElementType.METHOD,ElementType.TYPE})
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface TokenIgnore {
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
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>
|
||||
<parent>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-db-migration</artifactId>
|
||||
<artifactId>springboot-database</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-util</artifactId>
|
||||
</dependency>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.tiesheng.database;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@ComponentScan({
|
||||
"com.tiesheng.database.**.*"
|
||||
})
|
||||
public class DatabaseAutoConfigurer {
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.tiesheng.database.config;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.RuntimeUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import cn.hutool.log.LogFactory;
|
||||
import com.tiesheng.database.utls.TieshengDbUtil;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.SchedulingConfigurer;
|
||||
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "tiesheng.db.backup")
|
||||
@EnableScheduling
|
||||
public class DbBackupConfig implements SchedulingConfigurer {
|
||||
|
||||
/**
|
||||
* 数据库备份的路径
|
||||
*/
|
||||
private String path = "/root/backup/";
|
||||
|
||||
/**
|
||||
* 备份文件的时间格式
|
||||
*/
|
||||
private String format = "yyyyMMdd";
|
||||
|
||||
/**
|
||||
* 过期天数
|
||||
*/
|
||||
private Integer days = 7;
|
||||
|
||||
@Override
|
||||
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
|
||||
taskRegistrar.addCronTask(this::dbBackup, "0 0 1 * * ?");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 数据库备份
|
||||
*/
|
||||
public void dbBackup() {
|
||||
if (!FileUtil.exist(path)) {
|
||||
return;
|
||||
}
|
||||
|
||||
String url = SpringUtil.getProperty("spring.datasource.url");
|
||||
String username = SpringUtil.getProperty("spring.datasource.username");
|
||||
String password = SpringUtil.getProperty("spring.datasource.password");
|
||||
String dbName = TieshengDbUtil.getTableSchema(url);
|
||||
String backupDir = StrUtil.format("{}{}", getPath(), dbName);
|
||||
try {
|
||||
String saveFile = StrUtil.format("{}/{}.sql", backupDir, DateUtil.format(new Date(), format));
|
||||
FileUtil.mkParentDirs(saveFile);
|
||||
String cmd = StrUtil.format("mysqldump -u {} --password={} --databases {} " +
|
||||
"--compress --skip-opt --result-file {} ", username, password, dbName, saveFile);
|
||||
RuntimeUtil.execForStr(cmd);
|
||||
RuntimeUtil.execForStr(StrUtil.format("gzip -9f {}", saveFile));
|
||||
|
||||
// 删除过期备份
|
||||
List<String> forStr = RuntimeUtil.execForLines("find " + backupDir + " -name *.sql.gz -mtime +" + days);
|
||||
forStr.forEach(FileUtil::del);
|
||||
|
||||
} catch (Exception e) {
|
||||
LogFactory.get().info(e);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// setter\getter
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public String getFormat() {
|
||||
return format;
|
||||
}
|
||||
|
||||
public void setFormat(String format) {
|
||||
this.format = format;
|
||||
}
|
||||
|
||||
public Integer getDays() {
|
||||
return days;
|
||||
}
|
||||
|
||||
public void setDays(Integer days) {
|
||||
this.days = days;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.tiesheng.migration.config;
|
||||
package com.tiesheng.database.config;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
@@ -16,12 +16,13 @@ import java.util.List;
|
||||
* @author hao
|
||||
*/
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "tiesheng.db-migration")
|
||||
@ConfigurationProperties(prefix = "tiesheng.db.migration")
|
||||
public class DbMigrationConfig {
|
||||
|
||||
private String table = "core_config_db";
|
||||
private List<String> locations = CollUtil.newArrayList("classpath*:db/migration/*.sql");
|
||||
private String ignoreSqls = "drop,delete";
|
||||
private List<String> migrations = CollUtil.newArrayList("classpath*:db/migration/*.sql");
|
||||
private List<String> datas = CollUtil.newArrayList("classpath*:db/data/*.sql");
|
||||
private String ignoreSqls = "drop table,delete from";
|
||||
|
||||
/**
|
||||
* 检查数据库是否存在
|
||||
@@ -57,12 +58,20 @@ public class DbMigrationConfig {
|
||||
this.table = table;
|
||||
}
|
||||
|
||||
public List<String> getLocations() {
|
||||
return locations;
|
||||
public List<String> getMigrations() {
|
||||
return migrations;
|
||||
}
|
||||
|
||||
public void setLocations(List<String> locations) {
|
||||
this.locations = locations;
|
||||
public void setMigrations(List<String> migrations) {
|
||||
this.migrations = migrations;
|
||||
}
|
||||
|
||||
public List<String> getDatas() {
|
||||
return datas;
|
||||
}
|
||||
|
||||
public void setDatas(List<String> datas) {
|
||||
this.datas = datas;
|
||||
}
|
||||
|
||||
public String getIgnoreSqls() {
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.tiesheng.database.service;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@Component
|
||||
public interface DbDataInitializer {
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
void init();
|
||||
|
||||
}
|
||||
@@ -1,15 +1,14 @@
|
||||
package com.tiesheng.migration.service;
|
||||
package com.tiesheng.database.service;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.lang.func.VoidFunc1;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.db.Db;
|
||||
import cn.hutool.db.Entity;
|
||||
import com.tiesheng.migration.config.DbMigrationConfig;
|
||||
import com.tiesheng.database.config.DbMigrationConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.web.servlet.ServletContextInitializer;
|
||||
import org.springframework.core.io.Resource;
|
||||
@@ -20,7 +19,10 @@ import javax.servlet.ServletContext;
|
||||
import javax.sql.DataSource;
|
||||
import java.io.InputStream;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.zip.Checksum;
|
||||
|
||||
/**
|
||||
@@ -35,12 +37,24 @@ public class DbMigrationInitializer implements ServletContextInitializer {
|
||||
DataSource dataSource;
|
||||
@Autowired
|
||||
DbMigrationConfig dbMigrationConfig;
|
||||
@Autowired
|
||||
List<DbDataInitializer> dbDataInitializerList;
|
||||
|
||||
|
||||
@Override
|
||||
public void onStartup(ServletContext servletContext) {
|
||||
try {
|
||||
startDeal();
|
||||
|
||||
// 初始化
|
||||
Db coreDb = Db.use(dataSource);
|
||||
dbMigrationConfig.checkDbExists(coreDb);
|
||||
|
||||
startDeal(coreDb, dbMigrationConfig.getMigrations());
|
||||
startDeal(coreDb, dbMigrationConfig.getDatas());
|
||||
|
||||
// 其他数据初始化
|
||||
dbDataInitializerList.forEach(DbDataInitializer::init);
|
||||
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
}
|
||||
@@ -51,19 +65,16 @@ public class DbMigrationInitializer implements ServletContextInitializer {
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
private void startDeal() throws Exception {
|
||||
Db coreDb = Db.use(dataSource);
|
||||
dbMigrationConfig.checkDbExists(coreDb);
|
||||
|
||||
private void startDeal(Db coreDb, List<String> locations) throws Exception {
|
||||
PathMatchingResourcePatternResolver patternResolver = new PathMatchingResourcePatternResolver();
|
||||
for (String location : dbMigrationConfig.getLocations()) {
|
||||
List<Resource> resourceList = new ArrayList<>();
|
||||
for (String location : locations) {
|
||||
Resource[] resources = patternResolver.getResources(location);
|
||||
if (ArrayUtil.isEmpty(resources)) {
|
||||
return;
|
||||
}
|
||||
for (Resource resource : resources) {
|
||||
migrationByResource(resource, coreDb);
|
||||
}
|
||||
resourceList.addAll(Arrays.asList(resources));
|
||||
}
|
||||
resourceList.sort((o1, o2) -> StrUtil.compare(o1.getFilename(), o2.getFilename(), true));
|
||||
for (Resource resource : resourceList) {
|
||||
migrationByResource(resource, coreDb);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +95,8 @@ public class DbMigrationInitializer implements ServletContextInitializer {
|
||||
if (entity == null) {
|
||||
return;
|
||||
}
|
||||
AtomicReference<Integer> success = new AtomicReference<>(0);
|
||||
AtomicReference<Integer> fail = new AtomicReference<>(0);
|
||||
db.tx((VoidFunc1<Db>) parameter -> {
|
||||
List<String> split = StrUtil.split(readUtf8, ";");
|
||||
for (String sql : split) {
|
||||
@@ -91,16 +104,17 @@ public class DbMigrationInitializer implements ServletContextInitializer {
|
||||
if (StrUtil.isEmpty(sql)) {
|
||||
continue;
|
||||
}
|
||||
if (StrUtil.startWithAnyIgnoreCase(sql, StrUtil.splitToArray(dbMigrationConfig.getIgnoreSqls(), ","))) {
|
||||
if (StrUtil.containsAnyIgnoreCase(sql, StrUtil.splitToArray(dbMigrationConfig.getIgnoreSqls(), ","))) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
parameter.execute(sql);
|
||||
success.getAndSet(success.get() + 1);
|
||||
} catch (Exception ignore) {
|
||||
fail.getAndSet(fail.get() + 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
entity.set("checksum", checksum.getValue());
|
||||
entity.set("update_time", DateUtil.date());
|
||||
db.update(entity, Entity.create(dbMigrationConfig.getTable()).set("id", entity.get("id")));
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.tiesheng.database.service.impl;
|
||||
|
||||
import com.tiesheng.database.service.DbDataInitializer;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class DefaultDbDataInitializer implements DbDataInitializer {
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.tiesheng.database.utls;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
public class TieshengDbUtil {
|
||||
|
||||
/**
|
||||
* 通过url获取table_schema
|
||||
*
|
||||
* @param url
|
||||
* @return
|
||||
*/
|
||||
public static String getTableSchema(String url) {
|
||||
return StrUtil.sub(url, url.lastIndexOf('/') + 1, StrUtil.indexOf(url, '?'));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.tiesheng.migration;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@ComponentScan({
|
||||
"com.tiesheng.migration.**.*"
|
||||
})
|
||||
public class MigrationAutoConfigurer {
|
||||
}
|
||||
@@ -4,9 +4,9 @@
|
||||
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>
|
||||
<parent>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-encrypt</artifactId>
|
||||
@@ -18,11 +18,6 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15to18</artifactId>
|
||||
<version>1.68</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -31,12 +26,12 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-util</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-annotation</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
package com.tiesheng.encrypt;
|
||||
|
||||
|
||||
import com.tiesheng.encrypt.config.EncryptConfig;
|
||||
import com.tiesheng.encrypt.config.EncryptRequestBodyAdvice;
|
||||
import com.tiesheng.encrypt.config.DecryptRequestBodyAdvice;
|
||||
import com.tiesheng.encrypt.config.EncryptResponseBodyAdvice;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@Configuration
|
||||
@ComponentScan(basePackageClasses = {
|
||||
EncryptConfig.class,
|
||||
EncryptRequestBodyAdvice.class,
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.TYPE})
|
||||
@Documented
|
||||
@Import({
|
||||
DecryptRequestBodyAdvice.class,
|
||||
EncryptResponseBodyAdvice.class,
|
||||
})
|
||||
public class EnableEncryptConfig {
|
||||
public @interface EnableEncryptConfig {
|
||||
}
|
||||
|
||||
@@ -3,13 +3,8 @@ package com.tiesheng.encrypt.config;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.crypto.ECKeyUtil;
|
||||
import cn.hutool.crypto.SmUtil;
|
||||
import cn.hutool.crypto.asymmetric.KeyType;
|
||||
import cn.hutool.crypto.asymmetric.SM2;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import org.bouncycastle.crypto.params.ECPrivateKeyParameters;
|
||||
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
|
||||
import com.tiesheng.util.config.EncryptConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
@@ -26,7 +21,7 @@ import java.nio.charset.Charset;
|
||||
* @author hao
|
||||
*/
|
||||
@ControllerAdvice
|
||||
public class EncryptRequestBodyAdvice implements RequestBodyAdvice {
|
||||
public class DecryptRequestBodyAdvice implements RequestBodyAdvice {
|
||||
|
||||
|
||||
@Autowired
|
||||
@@ -42,12 +37,8 @@ public class EncryptRequestBodyAdvice implements RequestBodyAdvice {
|
||||
public HttpInputMessage beforeBodyRead(HttpInputMessage inputMessage, MethodParameter parameter, Type targetType,
|
||||
Class<? extends HttpMessageConverter<?>> converterType) {
|
||||
|
||||
if (!encryptConfig.isEnable()) {
|
||||
return inputMessage;
|
||||
}
|
||||
|
||||
try {
|
||||
return new DecryptHttpInputMessage(inputMessage, encryptConfig.getPrivateQ());
|
||||
return new DecryptHttpInputMessage(inputMessage, encryptConfig);
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
|
||||
@@ -72,16 +63,12 @@ public class EncryptRequestBodyAdvice implements RequestBodyAdvice {
|
||||
private HttpHeaders headers;
|
||||
private InputStream body;
|
||||
|
||||
DecryptHttpInputMessage(HttpInputMessage inputMessage, String privateQ) throws Exception {
|
||||
DecryptHttpInputMessage(HttpInputMessage inputMessage, EncryptConfig encryptConfig) throws Exception {
|
||||
this.headers = inputMessage.getHeaders();
|
||||
String bodyStr = IoUtil.read(inputMessage.getBody(), CharsetUtil.CHARSET_UTF_8);
|
||||
String encryptData = JSONUtil.parseObj(bodyStr).getStr("encryptData");
|
||||
if (!StrUtil.isEmpty(encryptData)) {
|
||||
// 部分语言加密之后缺少04前缀,如果解密失败,可尝试增加04
|
||||
ECPrivateKeyParameters privateKeyParameters = ECKeyUtil.toSm2PrivateParams(privateQ);
|
||||
ECPublicKeyParameters publicKeyParameters = ECKeyUtil.getPublicParams(privateKeyParameters);
|
||||
SM2 sm2 = SmUtil.sm2(privateKeyParameters, publicKeyParameters);
|
||||
String decrypt = sm2.decryptStr(encryptData, KeyType.PrivateKey);
|
||||
String decrypt = encryptConfig.decrypt(encryptData);
|
||||
this.body = IoUtil.toStream(decrypt, Charset.defaultCharset());
|
||||
} else {
|
||||
this.body = IoUtil.toStream(bodyStr, Charset.defaultCharset());
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.tiesheng.encrypt.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "tiesheng.encrypt")
|
||||
public class EncryptConfig {
|
||||
|
||||
public String publicD;
|
||||
public String privateQ;
|
||||
private boolean enable = false;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// setter\getter
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public boolean isEnable() {
|
||||
return enable;
|
||||
}
|
||||
|
||||
public void setEnable(boolean enable) {
|
||||
this.enable = enable;
|
||||
}
|
||||
|
||||
public String getPublicD() {
|
||||
return publicD;
|
||||
}
|
||||
|
||||
public void setPublicD(String publicD) {
|
||||
this.publicD = publicD;
|
||||
}
|
||||
|
||||
public String getPrivateQ() {
|
||||
return privateQ;
|
||||
}
|
||||
|
||||
public void setPrivateQ(String privateQ) {
|
||||
this.privateQ = privateQ;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,10 @@
|
||||
package com.tiesheng.encrypt.config;
|
||||
|
||||
import cn.hutool.core.annotation.AnnotationUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.crypto.ECKeyUtil;
|
||||
import cn.hutool.crypto.SmUtil;
|
||||
import cn.hutool.crypto.asymmetric.KeyType;
|
||||
import cn.hutool.crypto.asymmetric.SM2;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.hutool.log.LogFactory;
|
||||
import com.tiesheng.annotation.encrypt.EncryptedRespBody;
|
||||
import org.bouncycastle.crypto.params.ECPrivateKeyParameters;
|
||||
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
|
||||
import com.tiesheng.util.CommonUtil;
|
||||
import com.tiesheng.util.config.EncryptConfig;
|
||||
import com.tiesheng.util.pojos.ApiResp;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.http.MediaType;
|
||||
@@ -19,6 +12,7 @@ import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.server.ServerHttpRequest;
|
||||
import org.springframework.http.server.ServerHttpResponse;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
|
||||
|
||||
|
||||
@@ -26,50 +20,30 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
|
||||
* @author hao
|
||||
*/
|
||||
@ControllerAdvice
|
||||
public class EncryptResponseBodyAdvice implements ResponseBodyAdvice<Object> {
|
||||
public class EncryptResponseBodyAdvice implements ResponseBodyAdvice<ApiResp> {
|
||||
|
||||
@Autowired
|
||||
EncryptConfig encryptConfig;
|
||||
|
||||
@Override
|
||||
public boolean supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType) {
|
||||
return true;
|
||||
return AnnotationUtil.getAnnotation(returnType.getContainingClass(), RestController.class) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, Class<? extends
|
||||
public ApiResp beforeBodyWrite(ApiResp body, MethodParameter returnType, MediaType selectedContentType, Class<? extends
|
||||
HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) {
|
||||
|
||||
if (!encryptConfig.isEnable()) {
|
||||
return body;
|
||||
}
|
||||
|
||||
boolean encrypt = AnnotationUtil.getAnnotation(returnType.getContainingClass(), EncryptedRespBody.class) != null;
|
||||
if (!encrypt) {
|
||||
return body;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
String content = JSONUtil.toJsonStr(body);
|
||||
String respData = JSONUtil.parseObj(content).getStr("data");
|
||||
|
||||
if (StrUtil.isEmpty(respData)) {
|
||||
// 无需加密
|
||||
Object data = body.getData();
|
||||
if (data == null || !body.successful()) {
|
||||
return body;
|
||||
}
|
||||
|
||||
JSONObject resp = JSONUtil.parseObj(content);
|
||||
resp.set("encrypted", true);
|
||||
if (resp.getInt("code") == 200) {
|
||||
// 用公钥进行加密
|
||||
ECPrivateKeyParameters privateKeyParameters = ECKeyUtil.toSm2PrivateParams(encryptConfig.getPrivateQ());
|
||||
ECPublicKeyParameters publicKeyParameters = ECKeyUtil.getPublicParams(privateKeyParameters);
|
||||
SM2 sm2 = SmUtil.sm2(privateKeyParameters, publicKeyParameters);
|
||||
String decrypt = sm2.encryptHex(respData, KeyType.PublicKey);
|
||||
resp.set("data", decrypt.substring(2));
|
||||
}
|
||||
return resp;
|
||||
body.setEncrypt(true);
|
||||
body.setData(encryptConfig.encrypt(CommonUtil.writeJsonString(data)));
|
||||
return body;
|
||||
} catch (Exception var17) {
|
||||
LogFactory.get().info("加密数据异常", var17);
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<?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.tiesheng</groupId>
|
||||
<artifactId>launcher-maven-plugin</artifactId>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<version>0.0.1</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>3.5.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||
<artifactId>maven-plugin-annotations</artifactId>
|
||||
<version>3.5.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,72 +0,0 @@
|
||||
package com.tiesheng.launcher;
|
||||
|
||||
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* 指定调用本类execute()方法的目标
|
||||
**/
|
||||
@Mojo(name = "initScript", defaultPhase = LifecyclePhase.PREPARE_PACKAGE)
|
||||
public class CopyLauncherScriptMojo extends AbstractMojo {
|
||||
|
||||
@Parameter(defaultValue = "${basedir}/target", required = true)
|
||||
private File outputDirectory;
|
||||
|
||||
public void setOutputDirectory(File outputDirectory) {
|
||||
this.outputDirectory = outputDirectory;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute() throws MojoExecutionException {
|
||||
try {
|
||||
copy("launchScript");
|
||||
} catch (IOException e) {
|
||||
throw new MojoExecutionException("copy launchScript error!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 复制脚本
|
||||
*
|
||||
* @param filename
|
||||
* @throws IOException
|
||||
*/
|
||||
private void copy(String filename) throws IOException {
|
||||
InputStream inputStream = getClass().getResourceAsStream("/" + filename);
|
||||
BufferedWriter writer = null;
|
||||
try {
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
|
||||
File target = new File(outputDirectory + "/" + filename);
|
||||
target.setExecutable(true, false);
|
||||
target.setWritable(true, false);
|
||||
target.setReadable(true, false);
|
||||
writer = new BufferedWriter(new FileWriter(target));
|
||||
while (true) {
|
||||
String line = reader.readLine();
|
||||
if (line == null) {
|
||||
break;
|
||||
}
|
||||
writer.write(line);
|
||||
writer.newLine();
|
||||
}
|
||||
writer.flush();
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
}
|
||||
if (writer != null) {
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,256 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# . ____ _ __ _ _
|
||||
# /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
|
||||
# ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
|
||||
# \\/ ___)| |_)| | | | | || (_| | ) ) ) )
|
||||
# ' |____| .__|_| |_|_| |_\__, | / / / /
|
||||
# =========|_|==============|___/=/_/_/_/
|
||||
# :: Spring Boot Startup Script ::
|
||||
#
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: {{initInfoProvides:spring-boot-application}}
|
||||
# Required-Start: {{initInfoRequiredStart:$remote_fs $syslog $network}}
|
||||
# Required-Stop: {{initInfoRequiredStop:$remote_fs $syslog $network}}
|
||||
# Default-Start: {{initInfoDefaultStart:2 3 4 5}}
|
||||
# Default-Stop: {{initInfoDefaultStop:0 1 6}}
|
||||
# Short-Description: {{initInfoShortDescription:Spring Boot Application}}
|
||||
# Description: {{initInfoDescription:Spring Boot Application}}
|
||||
# chkconfig: {{initInfoChkconfig:2345 99 01}}
|
||||
### END INIT INFO
|
||||
|
||||
[[ -n "$DEBUG" ]] && set -x
|
||||
|
||||
# Initialize variables that cannot be provided by a .conf file
|
||||
WORKING_DIR="$(pwd)"
|
||||
# shellcheck disable=SC2153
|
||||
[[ -n "$JARFILE" ]] && jarfile="$JARFILE"
|
||||
[[ -n "$APP_NAME" ]] && identity="$APP_NAME"
|
||||
|
||||
# Follow symlinks to find the real jar and detect init.d script
|
||||
cd "$(dirname "$0")" || exit 1
|
||||
[[ -z "$jarfile" ]] && jarfile=$(pwd)/$(basename "$0")
|
||||
while [[ -L "$jarfile" ]]; do
|
||||
[[ "$jarfile" =~ init\.d ]] && init_script=$(basename "$jarfile")
|
||||
jarfile=$(readlink "$jarfile")
|
||||
cd "$(dirname "$jarfile")" || exit 1
|
||||
jarfile=$(pwd)/$(basename "$jarfile")
|
||||
done
|
||||
jarfolder="$( (cd "$(dirname "$jarfile")" && pwd -P) )"
|
||||
cd "$WORKING_DIR" || exit 1
|
||||
|
||||
# Source any config file
|
||||
configfile="$(basename "${jarfile%.*}.conf")"
|
||||
|
||||
# Initialize CONF_FOLDER location defaulting to jarfolder
|
||||
[[ -z "$CONF_FOLDER" ]] && CONF_FOLDER="{{confFolder:${jarfolder}}}"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[[ -r "${CONF_FOLDER}/${configfile}" ]] && source "${CONF_FOLDER}/${configfile}"
|
||||
|
||||
# Initialize PID/LOG locations if they weren't provided by the config file
|
||||
[[ -z "$PID_FOLDER" ]] && PID_FOLDER="{{pidFolder:/var/run}}"
|
||||
[[ -z "$LOG_FOLDER" ]] && LOG_FOLDER="{{logFolder:/var/log}}"
|
||||
! [[ "$PID_FOLDER" == /* ]] && PID_FOLDER="$(dirname "$jarfile")"/"$PID_FOLDER"
|
||||
! [[ "$LOG_FOLDER" == /* ]] && LOG_FOLDER="$(dirname "$jarfile")"/"$LOG_FOLDER"
|
||||
! [[ -x "$PID_FOLDER" ]] && PID_FOLDER="/tmp"
|
||||
! [[ -x "$LOG_FOLDER" ]] && LOG_FOLDER="/tmp"
|
||||
|
||||
# Set up defaults
|
||||
[[ -z "$MODE" ]] && MODE="{{mode:auto}}" # modes are "auto", "service" or "run"
|
||||
[[ -z "$USE_START_STOP_DAEMON" ]] && USE_START_STOP_DAEMON="{{useStartStopDaemon:true}}"
|
||||
|
||||
# Create an identity for log/pid files
|
||||
if [[ -z "$identity" ]]; then
|
||||
if [[ -n "$init_script" ]]; then
|
||||
identity="${init_script}"
|
||||
else
|
||||
identity=$(basename "${jarfile%.*}")_${jarfolder//\//}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Initialize log file name if not provided by the config file
|
||||
[[ -z "$LOG_FILENAME" ]] && LOG_FILENAME="{{logFilename:${identity}.log}}"
|
||||
|
||||
# Initialize stop wait time if not provided by the config file
|
||||
[[ -z "$STOP_WAIT_TIME" ]] && STOP_WAIT_TIME="{{stopWaitTime:60}}"
|
||||
|
||||
# ANSI Colors
|
||||
echoRed() { echo $'\e[0;31m'"$1"$'\e[0m'; }
|
||||
echoGreen() { echo $'\e[0;32m'"$1"$'\e[0m'; }
|
||||
echoYellow() { echo $'\e[0;33m'"$1"$'\e[0m'; }
|
||||
|
||||
# Utility functions
|
||||
checkPermissions() {
|
||||
touch "$pid_file" &> /dev/null || { echoRed "Operation not permitted (cannot access pid file)"; return 4; }
|
||||
touch "$log_file" &> /dev/null || { echoRed "Operation not permitted (cannot access log file)"; return 4; }
|
||||
}
|
||||
|
||||
isRunning() {
|
||||
ps -p "$1" | grep -v "PID" &> /dev/null
|
||||
}
|
||||
|
||||
await_file() {
|
||||
end=$(date +%s)
|
||||
let "end+=10"
|
||||
while [[ ! -s "$1" ]]
|
||||
do
|
||||
now=$(date +%s)
|
||||
if [[ $now -ge $end ]]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
# Determine the script mode
|
||||
action="config"
|
||||
if [[ "$MODE" == "auto" && -n "$init_script" ]] || [[ "$MODE" == "service" ]]; then
|
||||
action="$1"
|
||||
shift
|
||||
fi
|
||||
|
||||
# Build the pid and log filenames
|
||||
PID_FOLDER="$PID_FOLDER/${identity}"
|
||||
pid_file="$PID_FOLDER/{{pidFilename:${identity}.pid}}"
|
||||
log_file="$LOG_FOLDER/$LOG_FILENAME"
|
||||
|
||||
# Determine the user to run as if we are root
|
||||
# shellcheck disable=SC2012
|
||||
[[ $(id -u) == "0" ]] && run_user=$(ls -ld "$jarfile" | awk '{print $3}')
|
||||
|
||||
# Find Java
|
||||
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
|
||||
javaexe="$JAVA_HOME/bin/java"
|
||||
elif type -p java > /dev/null 2>&1; then
|
||||
javaexe=$(type -p java)
|
||||
elif [[ -x "/usr/bin/java" ]]; then
|
||||
javaexe="/usr/bin/java"
|
||||
else
|
||||
echo "Unable to find Java"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
arguments=(-Dsun.misc.URLClassPath.disableJarChecking=true $JAVA_OPTS -jar "$jarfile" $RUN_ARGS "$@")
|
||||
|
||||
# Action functions
|
||||
start() {
|
||||
if [[ -f "$pid_file" ]]; then
|
||||
pid=$(cat "$pid_file")
|
||||
isRunning "$pid" && { echoYellow "Already running [$pid]"; return 0; }
|
||||
fi
|
||||
do_start "$@"
|
||||
}
|
||||
|
||||
do_start() {
|
||||
working_dir=$(dirname "$jarfile")
|
||||
pushd "$working_dir" > /dev/null
|
||||
mkdir -p "$PID_FOLDER" &> /dev/null
|
||||
if [[ -n "$run_user" ]]; then
|
||||
checkPermissions || return $?
|
||||
chown "$run_user" "$PID_FOLDER"
|
||||
chown "$run_user" "$pid_file"
|
||||
chown "$run_user" "$log_file"
|
||||
if [ $USE_START_STOP_DAEMON = true ] && type start-stop-daemon > /dev/null 2>&1; then
|
||||
start-stop-daemon --start --quiet \
|
||||
--chuid "$run_user" \
|
||||
--name "$identity" \
|
||||
--make-pidfile --pidfile "$pid_file" \
|
||||
--background --no-close \
|
||||
--startas "$javaexe" \
|
||||
--chdir "$working_dir" \
|
||||
-- "${arguments[@]}" \
|
||||
>> "$log_file" 2>&1
|
||||
await_file "$pid_file"
|
||||
else
|
||||
su -s /bin/sh -c "$javaexe $(printf "\"%s\" " "${arguments[@]}") >> \"$log_file\" 2>&1 & echo \$!" "$run_user" > "$pid_file"
|
||||
fi
|
||||
pid=$(cat "$pid_file")
|
||||
else
|
||||
checkPermissions || return $?
|
||||
"$javaexe" "${arguments[@]}" >> "$log_file" 2>&1 &
|
||||
pid=$!
|
||||
disown $pid
|
||||
echo "$pid" > "$pid_file"
|
||||
fi
|
||||
[[ -z $pid ]] && { echoRed "Failed to start"; return 1; }
|
||||
echoGreen "Started [$pid]"
|
||||
}
|
||||
|
||||
stop() {
|
||||
working_dir=$(dirname "$jarfile")
|
||||
pushd "$working_dir" > /dev/null
|
||||
[[ -f $pid_file ]] || { echoYellow "Not running (pidfile not found)"; return 0; }
|
||||
pid=$(cat "$pid_file")
|
||||
isRunning "$pid" || { echoYellow "Not running (process ${pid}). Removing stale pid file."; rm -f "$pid_file"; return 0; }
|
||||
do_stop "$pid" "$pid_file"
|
||||
}
|
||||
|
||||
do_stop() {
|
||||
kill "$1" &> /dev/null || { echoRed "Unable to kill process $1"; return 1; }
|
||||
for i in $(seq 1 $STOP_WAIT_TIME); do
|
||||
isRunning "$1" || { echoGreen "Stopped [$1]"; rm -f "$2"; return 0; }
|
||||
[[ $i -eq STOP_WAIT_TIME/2 ]] && kill "$1" &> /dev/null
|
||||
sleep 1
|
||||
done
|
||||
echoRed "Unable to kill process $1";
|
||||
return 1;
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop && start
|
||||
}
|
||||
|
||||
status() {
|
||||
working_dir=$(dirname "$jarfile")
|
||||
pushd "$working_dir" > /dev/null
|
||||
[[ -f "$pid_file" ]] || { echoRed "Not running"; return 3; }
|
||||
pid=$(cat "$pid_file")
|
||||
isRunning "$pid" || { echoRed "Not running (process ${pid} not found)"; return 1; }
|
||||
echoGreen "Running [$pid]"
|
||||
return 0
|
||||
}
|
||||
|
||||
run() {
|
||||
pushd "$(dirname "$jarfile")" > /dev/null
|
||||
"$javaexe" "${arguments[@]}"
|
||||
result=$?
|
||||
popd > /dev/null
|
||||
return "$result"
|
||||
}
|
||||
|
||||
config() {
|
||||
|
||||
## 设置自启动
|
||||
ln -s $jarfile /etc/init.d/$1
|
||||
chkconfig --add $1
|
||||
|
||||
## 生成配置文件
|
||||
working_dir=$(dirname "$jarfile")
|
||||
conf_file="$working_dir/$configfile"
|
||||
echo "LOG_FOLDER=/dev" > $conf_file
|
||||
echo "LOG_FILENAME=null" >> $conf_file
|
||||
echo "RUN_ARGS='--server.port=$2 --spring.profiles.active=$3'" >> $conf_file
|
||||
echo "JAVA_OPTS='-Dfile.encoding=utf-8'" >> $conf_file
|
||||
}
|
||||
|
||||
# Call the appropriate action function
|
||||
case "$action" in
|
||||
start)
|
||||
start "$@"; exit $?;;
|
||||
stop)
|
||||
stop "$@"; exit $?;;
|
||||
restart)
|
||||
restart "$@"; exit $?;;
|
||||
status)
|
||||
status "$@"; exit $?;;
|
||||
run)
|
||||
run "$@"; exit $?;;
|
||||
config)
|
||||
config "$1" "$2" "$3" ; exit $?;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status|run|config}"; exit 1;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -4,9 +4,9 @@
|
||||
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>
|
||||
<parent>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>1.0.7</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-login</artifactId>
|
||||
@@ -27,12 +27,12 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-annotation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-platform</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||