fix: 文件上传转换工具
This commit is contained in:
@@ -128,6 +128,11 @@
|
|||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-test</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
package org.wfc.payment.utils;
|
package org.wfc.common.core.utils.file;
|
||||||
|
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import cn.hutool.http.HttpResponse;
|
import cn.hutool.http.HttpResponse;
|
||||||
import org.apache.http.entity.ContentType;
|
import org.apache.http.entity.ContentType;
|
||||||
import org.springframework.mock.web.MockMultipartFile;
|
import org.springframework.mock.web.MockMultipartFile;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MultipartFile和File互转工具类
|
* MultipartFile和File互转工具类
|
||||||
*/
|
*/
|
||||||
@@ -122,11 +122,6 @@
|
|||||||
<groupId>javax.persistence</groupId>
|
<groupId>javax.persistence</groupId>
|
||||||
<artifactId>javax.persistence-api</artifactId>
|
<artifactId>javax.persistence-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-test</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.wfc.common.core.domain.R;
|
import org.wfc.common.core.domain.R;
|
||||||
import org.wfc.common.core.exception.ServiceException;
|
import org.wfc.common.core.exception.ServiceException;
|
||||||
|
import org.wfc.common.core.utils.file.MultipartFileUtil;
|
||||||
import org.wfc.payment.pay.wxpay.service.IWxPayService;
|
import org.wfc.payment.pay.wxpay.service.IWxPayService;
|
||||||
import org.wfc.payment.utils.MultipartFileUtil;
|
|
||||||
import org.wfc.system.api.RemoteFileService;
|
import org.wfc.system.api.RemoteFileService;
|
||||||
import org.wfc.system.api.domain.SysFile;
|
import org.wfc.system.api.domain.SysFile;
|
||||||
import org.wfc.user.api.RemoteUUserService;
|
import org.wfc.user.api.RemoteUUserService;
|
||||||
|
|||||||
Reference in New Issue
Block a user