|
@@ -17,6 +17,7 @@ import com.fdkankan.ucenter.entity.ScenePlusExt;
|
|
|
import com.fdkankan.ucenter.entity.ScenePro;
|
|
|
import com.fdkankan.ucenter.entity.SceneProRe;
|
|
|
import com.fdkankan.ucenter.service.*;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -26,12 +27,14 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpSession;
|
|
|
+import java.io.File;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.ZoneOffset;
|
|
|
import java.util.*;
|
|
|
|
|
|
@RestController
|
|
|
+@Slf4j
|
|
|
@RequestMapping("/ucenter/test")
|
|
|
public class TestController extends BaseController {
|
|
|
@Autowired
|
|
@@ -112,7 +115,26 @@ public class TestController extends BaseController {
|
|
|
@GetMapping("/test1")
|
|
|
public Result test1(@RequestParam(required = false)String userName) throws Exception {
|
|
|
//luomin@cgaii.com
|
|
|
-
|
|
|
+ String path = "/mnt/4Dkankan/scene/images/imagest-eur-09XfNdBCB";
|
|
|
+ if(path.contains("images")){
|
|
|
+ String panPath = path +"/panorama";
|
|
|
+ File file = new File(panPath);
|
|
|
+ if(file.exists()){
|
|
|
+ File[] files = file.listFiles();
|
|
|
+ if(files == null || files.length == 0){
|
|
|
+ return Result.success( );
|
|
|
+ }
|
|
|
+ for (File file1 : files) {
|
|
|
+ String linkPath =file1.getPath() + "/capture";
|
|
|
+ log.info("delLink--filePath:{},exists:{}",linkPath,new File(linkPath).exists());
|
|
|
+ if(new File(linkPath).exists()){
|
|
|
+ log.info("delLink--filePath:{}",linkPath);
|
|
|
+ org.apache.commons.io.FileUtils.deleteQuietly(new File(linkPath));
|
|
|
+ //FileUtil.del(linkPath);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return Result.success( );
|
|
|
}
|
|
|
|