|
|
@@ -1,6 +1,8 @@
|
|
|
package com.fdkankan.contro.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.core.io.FileUtil;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.contro.entity.RelocationInit;
|
|
|
@@ -32,4 +34,15 @@ public class RelocationServiceImpl implements IRelocationService {
|
|
|
ri.setRelocationImages(imageList);
|
|
|
relocationInitService.save(ri);
|
|
|
}
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String homePath = "home/";
|
|
|
+ JSONObject dataFdage = JSON.parseObject(FileUtil.readUtf8String("D:\\Downloads\\hhh.json"));
|
|
|
+ JSONArray relocationImages = dataFdage.getJSONArray("relocation_images");
|
|
|
+ if(CollUtil.isEmpty(relocationImages)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<String> imageList = relocationImages.toJavaList(String.class).stream().map(v -> homePath + v).collect(Collectors.toList());
|
|
|
+ System.out.println(imageList);
|
|
|
+ }
|
|
|
}
|