|
@@ -20,6 +20,7 @@ import com.fdkankan.indoor.core.service.MergeInfoService;
|
|
|
import com.fdkankan.indoor.core.service.OwenService;
|
|
|
import com.fdkankan.indoor.core.service.PoiTypeGroupService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.junit.Test;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -245,6 +246,48 @@ public class OwenServiceImpl implements OwenService {
|
|
|
return Result.success(quadTree);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Result batchIndexHtml() {
|
|
|
+ String sDir = "/var/www/html/laser/maxkk/";
|
|
|
+ digui(sDir);
|
|
|
+ log.info("执行完成");
|
|
|
+ return Result.success("执行完成");
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void testbatch(){
|
|
|
+
|
|
|
+ digui("F:\\work\\四维-激光相机\\sit");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private static void digui(String sDir){
|
|
|
+
|
|
|
+ File[] faFiles = new File(sDir).listFiles();
|
|
|
+ for(File file: faFiles){
|
|
|
+ if(file.isFile()){
|
|
|
+ String path = file.getAbsolutePath();
|
|
|
+ if (path.contains("t-") && path.endsWith("index.html") ){
|
|
|
+ if (!path.contains("api")){
|
|
|
+ log.info("index文件路径: {}", path);
|
|
|
+
|
|
|
+ // 读取文件
|
|
|
+ String s = FileUtil.readUtf8String(path);
|
|
|
+ String newStr = s.replaceAll("https://laser.4dkankan.com", "https://laser-oss.4dkankan.com");
|
|
|
+ FileUtil.writeUtf8String(newStr, path);
|
|
|
+
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ digui(file.getAbsolutePath());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private String redisPath(String sceneCode) {
|
|
|
String initKey = TypeConstant.REDIS_INIT_PATH + sceneCode;
|