|
@@ -15,6 +15,7 @@ import org.jsoup.nodes.Document;
|
|
import org.jsoup.nodes.Element;
|
|
import org.jsoup.nodes.Element;
|
|
import org.jsoup.select.Elements;
|
|
import org.jsoup.select.Elements;
|
|
import org.springblade.common.constant.CommonConstant;
|
|
import org.springblade.common.constant.CommonConstant;
|
|
|
|
+import org.springblade.common.utils.CommonUtil;
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
@@ -1478,13 +1479,19 @@ public class WbsTreePrivateServiceImpl extends BaseServiceImpl<WbsTreePrivateMap
|
|
File file_in = ResourceUtil.getFile(tree.getHtmlUrl());
|
|
File file_in = ResourceUtil.getFile(tree.getHtmlUrl());
|
|
String fileCode = SnowFlakeUtil.getId() + "";
|
|
String fileCode = SnowFlakeUtil.getId() + "";
|
|
String htmlUrl = file_path + "/privateUrlCopy/" + fileCode + ".html";
|
|
String htmlUrl = file_path + "/privateUrlCopy/" + fileCode + ".html";
|
|
-// String htmlUrl = "C:\\Users\\泓创研发01\\Desktop\\privateUrlCopy\\" + fileCode + ".html";
|
|
|
|
File file_out = ResourceUtil.getFile(htmlUrl);
|
|
File file_out = ResourceUtil.getFile(htmlUrl);
|
|
FileUtil.copy(file_in, file_out);
|
|
FileUtil.copy(file_in, file_out);
|
|
tree.setHtmlUrl(htmlUrl);
|
|
tree.setHtmlUrl(htmlUrl);
|
|
}
|
|
}
|
|
//批量修改
|
|
//批量修改
|
|
- baseMapper.updateBatchByPKeyId(wbsTreePrivateList);
|
|
|
|
|
|
+ if (wbsTreePrivateList.size() > 1000){
|
|
|
|
+ List<List<WbsTreePrivate>> splitList = CommonUtil.splitList(wbsTreePrivateList, 1000);
|
|
|
|
+ for (List<WbsTreePrivate> list : splitList) {
|
|
|
|
+ baseMapper.updateBatchByPKeyId(list);
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ baseMapper.updateBatchByPKeyId(wbsTreePrivateList);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|