|
@@ -11,7 +11,6 @@ import com.tourism.common.core.util.MyCommonUtil;
|
|
|
import com.tourism.common.core.util.MyModelUtil;
|
|
|
import com.tourism.common.core.util.MyPageUtil;
|
|
|
import com.tourism.common.core.validator.UpdateGroup;
|
|
|
-import com.tourism.common.huaweicloud.moderation.service.HuaweiCloudModerationService;
|
|
|
import com.tourism.common.huaweicloud.obs.util.MergeAvatarsFlexUtils;
|
|
|
import com.tourism.common.log.annotation.OperationLog;
|
|
|
import com.tourism.common.log.model.constant.SysOperationLogType;
|
|
@@ -27,6 +26,7 @@ import com.tourism.webadmin.back.model.*;
|
|
|
import com.tourism.webadmin.back.model.constant.AuditState;
|
|
|
import com.tourism.webadmin.back.model.constant.UnmountState;
|
|
|
import com.tourism.webadmin.back.service.*;
|
|
|
+import com.tourism.webadmin.back.vo.TourTravelNotesMentionUserVo;
|
|
|
import com.tourism.webadmin.back.vo.TourismProjectTravelNotesWriteVo;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -50,16 +50,12 @@ public class WebSiteTourismTravelNotesPublishController {
|
|
|
@Autowired
|
|
|
private TourismProjectTravelNotesWriteService tourismProjectTravelNotesWriteService;
|
|
|
@Autowired
|
|
|
- private TourismTravelNotesContentWriteService tourismTravelNotesContentWriteService;
|
|
|
- @Autowired
|
|
|
private TourTourismProjectTravelNotesService tourTourismProjectTravelNotesService;
|
|
|
@Autowired
|
|
|
private TourUserService tourUserService;
|
|
|
@Autowired
|
|
|
private DirectoryInfoService directoryInfoService;
|
|
|
@Autowired
|
|
|
- private HuaweiCloudModerationService huaweiCloudModerationService;
|
|
|
- @Autowired
|
|
|
private ApplicationConfig applicationConfig;
|
|
|
@Autowired
|
|
|
private TourFansService tourFansService;
|
|
@@ -73,6 +69,12 @@ public class WebSiteTourismTravelNotesPublishController {
|
|
|
private MergeAvatarsFlexUtils mergeAvatarsFlexUtils;
|
|
|
@Autowired
|
|
|
private TourTravelNotesPublishService tourTravelNotesPublishService;
|
|
|
+ @Autowired
|
|
|
+ private TourTravelNotesImgService tourTravelNotesImgService;
|
|
|
+ @Autowired
|
|
|
+ private TourTravelNotesTopicRelationService tourTravelNotesTopicRelationService;
|
|
|
+ @Autowired
|
|
|
+ private TourTravelNotesMentionUserService tourTravelNotesMentionUserService;
|
|
|
|
|
|
/**
|
|
|
* 获取草稿id
|
|
@@ -163,8 +165,24 @@ public class WebSiteTourismTravelNotesPublishController {
|
|
|
TourismProjectTravelNotesWriteVo tourismProjectTravelNotesWriteVo = MyModelUtil.copyTo(tourismProjectTravelNotesWrite, TourismProjectTravelNotesWriteVo.class);
|
|
|
|
|
|
//填充图片
|
|
|
-
|
|
|
+ TourTravelNotesImg tourTravelNotesImg = new TourTravelNotesImg();
|
|
|
+ tourTravelNotesImg.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
|
|
|
+ List<TourTravelNotesImg> tourTravelNotesImgList = tourTravelNotesImgService.getTourTravelNotesImgList(tourTravelNotesImg, "");
|
|
|
+ List<String> imgUrlList = tourTravelNotesImgList.stream().map(TourTravelNotesImg::getImgUrl).collect(Collectors.toList());
|
|
|
+ tourismProjectTravelNotesWriteVo.setImgUrls(imgUrlList);
|
|
|
//填充关联话题
|
|
|
+ TourTravelNotesTopicRelation tourTravelNotesTopicRelation = new TourTravelNotesTopicRelation();
|
|
|
+ tourTravelNotesTopicRelation.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
|
|
|
+ List<TourTravelNotesTopicRelation> tourTravelNotesTopicRelationList =
|
|
|
+ tourTravelNotesTopicRelationService.getTourTravelNotesTopicRelationList(tourTravelNotesTopicRelation, "");
|
|
|
+ List<String> topicNameList = tourTravelNotesTopicRelationList.stream().map(TourTravelNotesTopicRelation::getTopicName).collect(Collectors.toList());
|
|
|
+ tourismProjectTravelNotesWriteVo.setTopics(topicNameList);
|
|
|
+ //填充提及的用户
|
|
|
+ TourTravelNotesMentionUser tourTravelNotesMentionUser = new TourTravelNotesMentionUser();
|
|
|
+ tourTravelNotesMentionUser.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
|
|
|
+ List<TourTravelNotesMentionUser> tourTravelNotesMentionUserList = tourTravelNotesMentionUserService.getTourTravelNotesMentionUserList(tourTravelNotesMentionUser, "");
|
|
|
+ List<TourTravelNotesMentionUserVo> tourTravelNotesMentionUserVo = MyModelUtil.copyCollectionTo(tourTravelNotesMentionUserList, TourTravelNotesMentionUserVo.class);
|
|
|
+ tourismProjectTravelNotesWriteVo.setMentions(tourTravelNotesMentionUserVo);
|
|
|
//填充关联用户
|
|
|
return ResponseResult.success(tourismProjectTravelNotesWriteVo);
|
|
|
}
|