|
@@ -30,6 +30,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
import lombok.SneakyThrows;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.io.FileUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -136,7 +137,7 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
|
if(!newObjFile.getParentFile().exists()){
|
|
|
newObjFile.getParentFile().mkdirs();
|
|
|
}
|
|
|
- file.transferTo(newObjFile);
|
|
|
+ FileUtils.copyInputStreamToFile(file.getInputStream(), newObjFile);
|
|
|
if(fileName.toLowerCase().endsWith(".zip")){
|
|
|
ShellUtil.unZip(newObjFile.getPath(),objPath);
|
|
|
}
|