|
@@ -63,7 +63,7 @@ public class TourismProjectTravelNotesWriteServiceImpl extends BaseService<Touri
|
|
|
@Override
|
|
|
public void saveNewBatch(List<TourismProjectTravelNotesWrite> tourismProjectTravelNotesWriteList) {
|
|
|
if (CollUtil.isNotEmpty(tourismProjectTravelNotesWriteList)) {
|
|
|
- tourismProjectTravelNotesWriteList.forEach(this::buildDefaultValue);
|
|
|
+// tourismProjectTravelNotesWriteList.forEach(this::buildDefaultValue);
|
|
|
tourismProjectTravelNotesWriteMapper.insertList(tourismProjectTravelNotesWriteList);
|
|
|
}
|
|
|
}
|
|
@@ -168,31 +168,11 @@ public class TourismProjectTravelNotesWriteServiceImpl extends BaseService<Touri
|
|
|
}
|
|
|
|
|
|
return notes;
|
|
|
+ }
|
|
|
|
|
|
- // 获取所有的段落元素
|
|
|
-// Elements paragraphs = doc.select("p:not(:has(img))");
|
|
|
-// for (Element p : paragraphs) {
|
|
|
-// TravelNotesWriteDTO note = new TravelNotesWriteDTO();
|
|
|
-// note.setSectionContent(p.text());
|
|
|
-// notes.add(note);
|
|
|
-// }
|
|
|
-//
|
|
|
-// // 获取所有的图片元素
|
|
|
-// Elements images = doc.select("p:has(img) img");
|
|
|
-// for (Element img : images) {
|
|
|
-// if (!notes.isEmpty()) {
|
|
|
-// // 假设每张图片都紧随其前一段文字之后
|
|
|
-// TravelNotesWriteDTO lastNote = notes.get(notes.size() - 1);
|
|
|
-// lastNote.setImage(img.attr("src"));
|
|
|
-// } else {
|
|
|
-// // 如果没有前一段文字,则创建一个新的笔记对象
|
|
|
-// TravelNotesWriteDTO note = new TravelNotesWriteDTO();
|
|
|
-// note.setImage(img.attr("src"));
|
|
|
-// notes.add(note);
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
-// return notes;
|
|
|
+ @Override
|
|
|
+ public Integer audit(TourismProjectTravelNotesWrite enrity) {
|
|
|
+ return tourismProjectTravelNotesWriteMapper.auditTravelNote(enrity);
|
|
|
}
|
|
|
|
|
|
private TourismProjectTravelNotesWrite buildDefaultValue(TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite) {
|