|
@@ -14,29 +14,26 @@ import com.tourism.common.log.model.constant.SysOperationLogType;
|
|
|
import com.tourism.common.sequence.wrapper.IdGeneratorWrapper;
|
|
|
import com.tourism.webadmin.app.website.dto.TourismProjectTravelNotesWriteDetailPageDto;
|
|
|
import com.tourism.webadmin.app.website.dto.WebsiteTourUserDto;
|
|
|
+import com.tourism.webadmin.app.website.vo.TourWriteBelongTabVo;
|
|
|
import com.tourism.webadmin.back.dto.TourismProjectTravelNotesWriteDto;
|
|
|
import com.tourism.webadmin.back.dto.TourismTravelNotesContentWriteDto;
|
|
|
-import com.tourism.webadmin.back.model.TourTourismProjectTravelNotes;
|
|
|
-import com.tourism.webadmin.back.model.TourUser;
|
|
|
-import com.tourism.webadmin.back.model.TourismProjectTravelNotesWrite;
|
|
|
-import com.tourism.webadmin.back.model.TourismTravelNotesContentWrite;
|
|
|
+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.TourTourismProjectTravelNotesService;
|
|
|
-import com.tourism.webadmin.back.service.TourUserService;
|
|
|
-import com.tourism.webadmin.back.service.TourismProjectTravelNotesWriteService;
|
|
|
-import com.tourism.webadmin.back.service.TourismTravelNotesContentWriteService;
|
|
|
+import com.tourism.webadmin.back.service.*;
|
|
|
import com.tourism.webadmin.back.vo.TourismProjectTravelNotesWriteVo;
|
|
|
import com.tourism.webadmin.back.vo.TourismTravelNotesContentWriteVo;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import ognl.Token;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
+import org.apache.poi.ss.formula.functions.T;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -56,6 +53,8 @@ public class WebSiteTourismTravelNotesPublishController {
|
|
|
private TourTourismProjectTravelNotesService tourTourismProjectTravelNotesService;
|
|
|
@Autowired
|
|
|
private TourUserService tourUserService;
|
|
|
+ @Autowired
|
|
|
+ private DirectoryInfoService directoryInfoService;
|
|
|
|
|
|
/**
|
|
|
* 获取草稿id
|
|
@@ -369,11 +368,33 @@ public class WebSiteTourismTravelNotesPublishController {
|
|
|
*
|
|
|
* @return 应答结果对象,包含查询结果集。
|
|
|
*/
|
|
|
-// @OperationLog(type = SysOperationLogType.LIST)
|
|
|
-// @GetMapping("/getWriteBelongTab")
|
|
|
-// public ResponseResult<Integer> getWriteBelongTab() {
|
|
|
-//
|
|
|
-// }
|
|
|
+ @OperationLog(type = SysOperationLogType.LIST)
|
|
|
+ @GetMapping("/getWriteBelongTab")
|
|
|
+ public ResponseResult<List<TourWriteBelongTabVo>> getWriteBelongTab() {
|
|
|
+
|
|
|
+ DirectoryInfo directoryInfo = new DirectoryInfo();
|
|
|
+ directoryInfo.setParentId(0L);
|
|
|
+ directoryInfo.setDirectoryType(1);
|
|
|
+ List<DirectoryInfo> directoryInfoList = directoryInfoService.getDirectoryInfoList(directoryInfo, "");
|
|
|
+
|
|
|
+ List<TourWriteBelongTabVo> tourWriteBelongTabVoList = MyModelUtil.copyCollectionTo(directoryInfoList, TourWriteBelongTabVo.class);
|
|
|
+ List<TourWriteBelongTabVo> newDirectoryInfoList = new ArrayList<>();
|
|
|
+ for(TourWriteBelongTabVo i : tourWriteBelongTabVoList){
|
|
|
+ if(i.getId() != 10L){
|
|
|
+ DirectoryInfo directoryInfo2 = new DirectoryInfo();
|
|
|
+ directoryInfo2.setParentId(i.getId());
|
|
|
+ directoryInfo2.setDirectoryType(1);
|
|
|
+ List<DirectoryInfo> bodyDirectoryInfoList = directoryInfoService.getDirectoryInfoList(directoryInfo2, "");
|
|
|
+
|
|
|
+ List<TourWriteBelongTabVo> bodyTourWriteBelongTabVoList = MyModelUtil.copyCollectionTo(bodyDirectoryInfoList, TourWriteBelongTabVo.class);
|
|
|
+ if(CollectionUtils.isNotEmpty(bodyDirectoryInfoList)){
|
|
|
+ i.setTourWriteBelongTabVoList(bodyTourWriteBelongTabVoList);
|
|
|
+ }
|
|
|
+ newDirectoryInfoList.add(i);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ResponseResult.success(newDirectoryInfoList);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|