修改SDK中的id类型为String

This commit is contained in:
ajaxfan
2021-01-18 19:14:23 +08:00
parent b7c35c633b
commit 8ee867f6db
20 changed files with 75 additions and 6 deletions

View File

@ -0,0 +1,64 @@
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-attachment-sdk</artifactId>
<version>0.0.1</version>
<parent>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-parent</artifactId>
<version>0.0.1</version>
<relativePath>../mall-ebtp-cloud-parent</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-mvc-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-okhttp</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>nexus-aliyun</id>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>ettp-host-release</id>
<name>Install to ettp center</name>
<url>http://zentao.jlcucc.com:60000/repository/ettp-releases/</url>
</repository>
</distributionManagement>
</project>

View File

@ -0,0 +1,3 @@
# AutoConfiguration
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.chinaunicom.ebtp.mall.cloud.attachment.sdk.config.SDKAutoConfiguration

View File

@ -0,0 +1,2 @@
ribbon.ReadTimeout=1800000
ribbon.SocketTimeout=1800000

View File

@ -60,7 +60,7 @@ public interface AttachmentClient {
* @param file
* @return
*/
Optional<UploadObject> upload(Long businessId, File file);
Optional<UploadObject> upload(String businessId, File file);
/**
* 上传资源文件
@ -69,6 +69,6 @@ public interface AttachmentClient {
* @param file
* @return
*/
Optional<UploadObject> upload(Long businessId, String filename, byte[] array);
Optional<UploadObject> upload(String businessId, String filename, byte[] array);
}

View File

@ -99,7 +99,7 @@ public class DefaultAttachmentClient implements AttachmentClient {
* @return
*/
@Override
public Optional<UploadObject> upload(Long businessId, File file) {
public Optional<UploadObject> upload(String businessId, File file) {
Objects.requireNonNull(businessId);
Objects.requireNonNull(file);
@ -117,7 +117,7 @@ public class DefaultAttachmentClient implements AttachmentClient {
* @return
*/
@Override
public Optional<UploadObject> upload(Long businessId, String filename, byte[] array) {
public Optional<UploadObject> upload(String businessId, String filename, byte[] array) {
Objects.requireNonNull(businessId);
Objects.requireNonNull(array);

View File

@ -29,7 +29,7 @@ public class QueryServiceFallback implements QueryService {
}
@Override
public FeedbackMessage handleFileUpload(Long businessId, MultipartFile file) {
public FeedbackMessage handleFileUpload(String businessId, MultipartFile file) {
return null;
}

View File

@ -31,7 +31,7 @@ public interface QueryService {
AttachmentDetail getAttachmentDetails(@RequestBody QueryParameter param);
@RequestMapping(value = "/v1/attachment/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
FeedbackMessage handleFileUpload(@RequestPart(value = "businessId") Long businessId,
FeedbackMessage handleFileUpload(@RequestPart(value = "businessId") String businessId,
@RequestPart(value = "file") MultipartFile file);
@GetMapping("/v1/attachment/download/bid/{bid}")