|
@@ -16,6 +16,7 @@ import com.fdkankan.redis.util.RedisLockUtil;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
import com.fdkankan.web.response.ResultData;
|
|
|
import lombok.extern.log4j.Log4j2;
|
|
|
+import net.lingala.zip4j.core.ZipFile;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -95,7 +96,15 @@ public class SceneFileController{
|
|
|
log.info("dataSource 为:{}", dataSource);
|
|
|
|
|
|
// 解压资源文件上传
|
|
|
- ZipUtil.unzip(filePath.concat(zipFileName),filePath);
|
|
|
+ ZipFile zipFile = new ZipFile(new File(filePath.concat(zipFileName)));
|
|
|
+ if (zipFile.isEncrypted()) {
|
|
|
+ String pwd = zipFileName.substring(0, 5).concat(zipFileName.substring(0, 5));
|
|
|
+ zipFile.setPassword(pwd);
|
|
|
+ zipFile.extractAll(filePath);
|
|
|
+ } else {
|
|
|
+ ZipUtil.unzip(filePath.concat(zipFileName), filePath);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// 上传oaas
|
|
|
fYunFileService.uploadFileByCommand(filePath.concat(folderName), ConstantFilePath.OSS_PREFIX.concat(subFolder));
|