|
@@ -1,5 +1,6 @@
|
|
package com.fdkankan.scene.service.impl;
|
|
package com.fdkankan.scene.service.impl;
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.RuntimeUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -24,6 +25,7 @@ import java.util.ArrayList;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.UUID;
|
|
import java.util.UUID;
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
import org.joda.time.DateTime;
|
|
import org.joda.time.DateTime;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -38,6 +40,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
* @author dengsixing
|
|
* @author dengsixing
|
|
* @since 2022/11/24
|
|
* @since 2022/11/24
|
|
**/
|
|
**/
|
|
|
|
+@Slf4j
|
|
@Service
|
|
@Service
|
|
public class InnerApiServiceImpl implements IInnerApiService {
|
|
public class InnerApiServiceImpl implements IInnerApiService {
|
|
|
|
|
|
@@ -86,7 +89,12 @@ public class InnerApiServiceImpl implements IInnerApiService {
|
|
CreateObjUtil.unZip(dataSource + file.getOriginalFilename(), dataSource);
|
|
CreateObjUtil.unZip(dataSource + file.getOriginalFilename(), dataSource);
|
|
}
|
|
}
|
|
if(file.getOriginalFilename().toLowerCase().endsWith(".rar")){
|
|
if(file.getOriginalFilename().toLowerCase().endsWith(".rar")){
|
|
- CreateObjUtil.unRar(dataSource + file.getOriginalFilename(), dataSource);
|
|
|
|
|
|
+// CreateObjUtil.unRar(dataSource + file.getOriginalFilename(), dataSource);
|
|
|
|
+ log.info("解压rar开始");
|
|
|
|
+ String command = "unrar x " + dataSource + file.getOriginalFilename() + " " + dataSource;
|
|
|
|
+ RuntimeUtil.exec(command);
|
|
|
|
+ log.info("解压rar完毕:" + command);
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
//删除压缩包
|
|
//删除压缩包
|