Compare commits

...

2 Commits
0.8.2 ... 0.8.3

Author SHA1 Message Date
曾文豪
f07e6d99e3 publish 0.8.3 2023-03-07 18:16:51 +08:00
曾文豪
fc4b3139aa perf: 调整文件上传的接口 2023-03-07 18:16:31 +08:00
15 changed files with 110 additions and 26 deletions

20
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
<packaging>pom</packaging>
<name>springboot-parent</name>
<description>杭州铁晟科技有限公司基础依赖</description>
@@ -57,55 +57,55 @@
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-database</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-login</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-web</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-util</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-platform</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-message</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-encrypt</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-annotation</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-poi</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</dependency>
<dependency>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</parent>
<artifactId>springboot-ademo</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</parent>
<artifactId>springboot-annotation</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</parent>
<artifactId>springboot-database</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</parent>
<artifactId>springboot-encrypt</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</parent>
<artifactId>springboot-login</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</parent>
<artifactId>springboot-message</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</parent>
<artifactId>springboot-platform</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</parent>
<artifactId>springboot-poi</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</parent>
<artifactId>springboot-util</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.8.2</version>
<version>0.8.3</version>
</parent>
<artifactId>springboot-web</artifactId>

View File

@@ -4,6 +4,9 @@ package com.tiesheng.core.controller;
import cn.hutool.captcha.LineCaptcha;
import cn.hutool.core.util.IdUtil;
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.vo.PicVerifyVo;
import com.tiesheng.core.service.FileUploadService;
@@ -68,8 +71,8 @@ public class ToolController {
*/
@TokenIgnore
@PostMapping(value = "/file/chunk_start")
public ApiResp<String> fileChunkStart(String fileExt) {
fileUploadService.chunkStart(fileExt);
public ApiResp<String> fileChunkStart(@RequestBody ChunkStartDTO dto) {
fileUploadService.chunkStart(dto.getFileExt());
return ApiResp.respOK("");
}
@@ -81,8 +84,8 @@ public class ToolController {
*/
@TokenIgnore
@PostMapping("/file/chunk_check")
public ApiResp<Boolean> fileChunkCheck(String fileMd5, Integer chunk) {
boolean exist = fileUploadService.chunkCheck(fileMd5, chunk);
public ApiResp<Boolean> fileChunkCheck(@RequestBody ChunkCheckDTO dto) {
boolean exist = fileUploadService.chunkCheck(dto.getFileMd5(), dto.getChunk());
return ApiResp.respOK(exist);
}
@@ -108,8 +111,8 @@ public class ToolController {
*/
@TokenIgnore
@PostMapping("/file/chunk_merge")
public ApiResp<String> fileChunkMerge(String fileMd5, String fileExt) {
String path = fileUploadService.chunkMerge(fileMd5, fileExt);
public ApiResp<String> fileChunkMerge(@RequestBody ChunkMergeDTO dto) {
String path = fileUploadService.chunkMerge(dto.getFileMd5(), dto.getFileExt());
return ApiResp.respOK(path);
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}