Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b205ebb30 | ||
| 7364ffb094 | |||
| 6f444a4d4c | |||
|
|
2a0248ff16 | ||
|
|
ef97488ea0 | ||
|
|
8873053c06 | ||
|
|
a65ea27485 | ||
|
|
4343601da1 | ||
|
|
f07e6d99e3 | ||
|
|
fc4b3139aa |
25
.gitea/workflows/mvn-deploy.yaml
Normal file
25
.gitea/workflows/mvn-deploy.yaml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
## 工作流触发时机
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
## 任务名称
|
||||||
|
local-deploy:
|
||||||
|
|
||||||
|
## 任务执行的服务器
|
||||||
|
runs-on: tiesheng-local
|
||||||
|
|
||||||
|
## 任务步骤
|
||||||
|
steps:
|
||||||
|
|
||||||
|
## 检出代码(固定配置)
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: https://git.tieshengkeji.com/actions/checkout@v4
|
||||||
|
|
||||||
|
## maven打包
|
||||||
|
- name: Maven deploy
|
||||||
|
run: |
|
||||||
|
mvn deploy
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,3 +6,4 @@ rebel.xml
|
|||||||
/static/
|
/static/
|
||||||
/config/
|
/config/
|
||||||
/runtime/
|
/runtime/
|
||||||
|
.DS_Store
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
|
## 0.8.3
|
||||||
|
|
||||||
|
### 调整
|
||||||
|
|
||||||
|
> 1,优化返回数据加密;
|
||||||
|
> 2,上传文件接口调整,统一为**application/json**格式;
|
||||||
|
|
||||||
## 0.8.0
|
## 0.8.0
|
||||||
|
|
||||||
### 调整
|
### 调整
|
||||||
|
|
||||||
> 1,移除**PasswordUtil**类,新增**EncryptConfig**配置;
|
> 1,移除**PasswordUtil**类,新增**EncryptConfig**配置;
|
||||||
> 2,默认启用网络请求的加解密,前端请配合接口使用。
|
> 2,默认启用网络请求的加解密,前端请配合接口使用。
|
||||||
|
|
||||||
## 0.7.4
|
## 0.7.4
|
||||||
|
|
||||||
|
|||||||
33
pom.xml
33
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>springboot-parent</name>
|
<name>springboot-parent</name>
|
||||||
<description>杭州铁晟科技有限公司基础依赖</description>
|
<description>杭州铁晟科技有限公司基础依赖</description>
|
||||||
@@ -57,55 +57,55 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-database</artifactId>
|
<artifactId>springboot-database</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-login</artifactId>
|
<artifactId>springboot-login</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-web</artifactId>
|
<artifactId>springboot-web</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-util</artifactId>
|
<artifactId>springboot-util</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-platform</artifactId>
|
<artifactId>springboot-platform</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-message</artifactId>
|
<artifactId>springboot-message</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-encrypt</artifactId>
|
<artifactId>springboot-encrypt</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-annotation</artifactId>
|
<artifactId>springboot-annotation</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-poi</artifactId>
|
<artifactId>springboot-poi</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -125,18 +125,25 @@
|
|||||||
|
|
||||||
<pluginRepositories>
|
<pluginRepositories>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<id>kepai-repo-plugin</id>
|
<id>tiesheng-repo-plugin</id>
|
||||||
<url>http://git.kepai365.com/zeng_wenhao/kepai-repo/raw/master</url>
|
<url>https://git.tieshengkeji.com/api/packages/tieshengkeji/maven</url>
|
||||||
</pluginRepository>
|
</pluginRepository>
|
||||||
</pluginRepositories>
|
</pluginRepositories>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>tiesheng-gitea</id>
|
||||||
|
<url>https://git.tieshengkeji.com/api/packages/tieshengkeji/maven</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.tiesheng.springboot-plugin</groupId>
|
<groupId>com.tiesheng.springboot-plugin</groupId>
|
||||||
<artifactId>tiesheng-maven-plugin</artifactId>
|
<artifactId>tiesheng-maven-plugin</artifactId>
|
||||||
<version>0.0.5</version>
|
<version>1.0.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-ademo</artifactId>
|
<artifactId>springboot-ademo</artifactId>
|
||||||
|
|||||||
@@ -102,7 +102,9 @@ public class TestController {
|
|||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
public ApiResp<List<TestFile>> desensitize() {
|
public ApiResp<List<TestFile>> desensitize() {
|
||||||
TestFile file = new TestFile("11111");
|
TestFile file = new TestFile("11111");
|
||||||
|
file.setTest("111111");
|
||||||
TestFile file1 = new TestFile("22222");
|
TestFile file1 = new TestFile("22222");
|
||||||
|
file1.setTest("22222");
|
||||||
return ApiResp.respOK(CollUtil.newArrayList(file, file1));
|
return ApiResp.respOK(CollUtil.newArrayList(file, file1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,21 @@
|
|||||||
package com.tiesheng.demo.pojos;
|
package com.tiesheng.demo.pojos;
|
||||||
|
|
||||||
import com.tiesheng.annotation.desensitize.Desensitize;
|
|
||||||
import com.tiesheng.poi.pojos.PoiWriteBase;
|
import com.tiesheng.poi.pojos.PoiWriteBase;
|
||||||
|
|
||||||
public class TestFile implements PoiWriteBase {
|
|
||||||
|
|
||||||
|
public class TestFile extends TestParent implements PoiWriteBase {
|
||||||
|
|
||||||
@Desensitize()
|
private String name;
|
||||||
private String test;
|
|
||||||
|
|
||||||
public TestFile(String test) {
|
public TestFile(String name) {
|
||||||
this.test = test;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
public String getName() {
|
||||||
// setter、getter
|
return name;
|
||||||
///////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public String getTest() {
|
|
||||||
return test;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTest(String test) {
|
public void setName(String name) {
|
||||||
this.test = test;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-annotation</artifactId>
|
<artifactId>springboot-annotation</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-database</artifactId>
|
<artifactId>springboot-database</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-encrypt</artifactId>
|
<artifactId>springboot-encrypt</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-login</artifactId>
|
<artifactId>springboot-login</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-message</artifactId>
|
<artifactId>springboot-message</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-platform</artifactId>
|
<artifactId>springboot-platform</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-poi</artifactId>
|
<artifactId>springboot-poi</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-util</artifactId>
|
<artifactId>springboot-util</artifactId>
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
package com.tiesheng.util;
|
package com.tiesheng.util;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.serializer.SerializeFilter;
|
|
||||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
import com.alibaba.fastjson.support.config.FastJsonConfig;
|
import com.alibaba.fastjson.support.config.FastJsonConfig;
|
||||||
import com.tiesheng.util.config.desensitize.DesensitizeValueFilter;
|
import com.tiesheng.util.config.DesensitizeValueFilter;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class CommonUtil {
|
public class CommonUtil {
|
||||||
|
|
||||||
@@ -40,13 +36,10 @@ public class CommonUtil {
|
|||||||
*/
|
*/
|
||||||
public static String writeJsonString(Object value) throws IOException {
|
public static String writeJsonString(Object value) throws IOException {
|
||||||
FastJsonConfig fastJsonConfig = fastJsonConfig();
|
FastJsonConfig fastJsonConfig = fastJsonConfig();
|
||||||
SerializeFilter[] globalFilters = fastJsonConfig.getSerializeFilters();
|
|
||||||
List<SerializeFilter> allFilters = new ArrayList(Arrays.asList(globalFilters));
|
|
||||||
|
|
||||||
ByteArrayOutputStream outnew = new ByteArrayOutputStream();
|
ByteArrayOutputStream outnew = new ByteArrayOutputStream();
|
||||||
JSON.writeJSONStringWithFastJsonConfig(outnew, fastJsonConfig.getCharset(),
|
JSON.writeJSONStringWithFastJsonConfig(outnew, fastJsonConfig.getCharset(),
|
||||||
value, fastJsonConfig.getSerializeConfig(),
|
value, fastJsonConfig.getSerializeConfig(),
|
||||||
allFilters.toArray(new SerializeFilter[allFilters.size()]),
|
fastJsonConfig.getSerializeFilters(),
|
||||||
fastJsonConfig.getDateFormat(), JSON.DEFAULT_GENERATE_FEATURE,
|
fastJsonConfig.getDateFormat(), JSON.DEFAULT_GENERATE_FEATURE,
|
||||||
fastJsonConfig.getSerializerFeatures());
|
fastJsonConfig.getSerializerFeatures());
|
||||||
return outnew.toString();
|
return outnew.toString();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.tiesheng.util.config.desensitize;
|
package com.tiesheng.util.config;
|
||||||
|
|
||||||
import cn.hutool.core.util.ClassUtil;
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.ReflectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.serializer.ValueFilter;
|
import com.alibaba.fastjson.serializer.ValueFilter;
|
||||||
import com.tiesheng.annotation.desensitize.Desensitize;
|
import com.tiesheng.annotation.desensitize.Desensitize;
|
||||||
@@ -21,7 +21,7 @@ public class DesensitizeValueFilter implements ValueFilter {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
Field field = ClassUtil.getDeclaredField(object.getClass(), name);
|
Field field = ReflectUtil.getField(object.getClass(), name);
|
||||||
if (ObjectUtil.isEmpty(field)) {
|
if (ObjectUtil.isEmpty(field)) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.2</version>
|
<version>0.8.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-web</artifactId>
|
<artifactId>springboot-web</artifactId>
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ package com.tiesheng.core.controller;
|
|||||||
import cn.hutool.captcha.LineCaptcha;
|
import cn.hutool.captcha.LineCaptcha;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import com.tiesheng.annotation.token.TokenIgnore;
|
import com.tiesheng.annotation.token.TokenIgnore;
|
||||||
|
import com.tiesheng.core.pojos.dto.ChunkCheckDTO;
|
||||||
|
import com.tiesheng.core.pojos.dto.ChunkMergeDTO;
|
||||||
|
import com.tiesheng.core.pojos.dto.ChunkStartDTO;
|
||||||
import com.tiesheng.core.pojos.dto.ImageCodeDTO;
|
import com.tiesheng.core.pojos.dto.ImageCodeDTO;
|
||||||
import com.tiesheng.core.pojos.vo.PicVerifyVo;
|
import com.tiesheng.core.pojos.vo.PicVerifyVo;
|
||||||
import com.tiesheng.core.service.FileUploadService;
|
import com.tiesheng.core.service.FileUploadService;
|
||||||
@@ -68,8 +71,8 @@ public class ToolController {
|
|||||||
*/
|
*/
|
||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
@PostMapping(value = "/file/chunk_start")
|
@PostMapping(value = "/file/chunk_start")
|
||||||
public ApiResp<String> fileChunkStart(String fileExt) {
|
public ApiResp<String> fileChunkStart(@RequestBody ChunkStartDTO dto) {
|
||||||
fileUploadService.chunkStart(fileExt);
|
fileUploadService.chunkStart(dto.getFileExt());
|
||||||
return ApiResp.respOK("");
|
return ApiResp.respOK("");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,8 +84,8 @@ public class ToolController {
|
|||||||
*/
|
*/
|
||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
@PostMapping("/file/chunk_check")
|
@PostMapping("/file/chunk_check")
|
||||||
public ApiResp<Boolean> fileChunkCheck(String fileMd5, Integer chunk) {
|
public ApiResp<Boolean> fileChunkCheck(@RequestBody ChunkCheckDTO dto) {
|
||||||
boolean exist = fileUploadService.chunkCheck(fileMd5, chunk);
|
boolean exist = fileUploadService.chunkCheck(dto.getFileMd5(), dto.getChunk());
|
||||||
return ApiResp.respOK(exist);
|
return ApiResp.respOK(exist);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,8 +111,8 @@ public class ToolController {
|
|||||||
*/
|
*/
|
||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
@PostMapping("/file/chunk_merge")
|
@PostMapping("/file/chunk_merge")
|
||||||
public ApiResp<String> fileChunkMerge(String fileMd5, String fileExt) {
|
public ApiResp<String> fileChunkMerge(@RequestBody ChunkMergeDTO dto) {
|
||||||
String path = fileUploadService.chunkMerge(fileMd5, fileExt);
|
String path = fileUploadService.chunkMerge(dto.getFileMd5(), dto.getFileExt());
|
||||||
return ApiResp.respOK(path);
|
return ApiResp.respOK(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.tiesheng.core.pojos.dto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hao
|
||||||
|
*/
|
||||||
|
public class ChunkCheckDTO {
|
||||||
|
|
||||||
|
private String fileMd5;
|
||||||
|
private Integer chunk;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// setter\getter
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
public String getFileMd5() {
|
||||||
|
return fileMd5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileMd5(String fileMd5) {
|
||||||
|
this.fileMd5 = fileMd5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getChunk() {
|
||||||
|
return chunk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChunk(Integer chunk) {
|
||||||
|
this.chunk = chunk;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.tiesheng.core.pojos.dto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hao
|
||||||
|
*/
|
||||||
|
public class ChunkMergeDTO {
|
||||||
|
|
||||||
|
private String fileMd5;
|
||||||
|
private String fileExt;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// setter\getter
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
public String getFileMd5() {
|
||||||
|
return fileMd5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileMd5(String fileMd5) {
|
||||||
|
this.fileMd5 = fileMd5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileExt() {
|
||||||
|
return fileExt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileExt(String fileExt) {
|
||||||
|
this.fileExt = fileExt;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.tiesheng.core.pojos.dto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hao
|
||||||
|
*/
|
||||||
|
public class ChunkStartDTO {
|
||||||
|
|
||||||
|
private String fileExt;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// setter\getter
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
public String getFileExt() {
|
||||||
|
return fileExt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileExt(String fileExt) {
|
||||||
|
this.fileExt = fileExt;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user