|
@@ -11,6 +11,7 @@ import com.tourism.common.core.object.ResponseResult;
|
|
|
import com.tourism.common.core.object.TokenData;
|
|
|
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.log.annotation.OperationLog;
|
|
|
import com.tourism.common.log.model.constant.SysOperationLogType;
|
|
@@ -21,6 +22,7 @@ import com.tourism.webadmin.app.website.service.BasicToWebService;
|
|
|
import com.tourism.webadmin.app.website.vo.TourTravelNotesDirectoryCountryVo;
|
|
|
import com.tourism.webadmin.app.website.vo.TourTravelNotesDirectoryVo;
|
|
|
import com.tourism.webadmin.back.model.*;
|
|
|
+import com.tourism.webadmin.back.model.constant.UnmountState;
|
|
|
import com.tourism.webadmin.back.service.*;
|
|
|
import com.tourism.webadmin.back.vo.TourTourismProjectTravelNotesVo;
|
|
|
import com.tourism.webadmin.back.vo.TourismProjectVo;
|
|
@@ -59,6 +61,8 @@ public class WebsiteTourismProjectTravelNotesController {
|
|
|
private ApplicationConfig applicationConfig;
|
|
|
@Autowired
|
|
|
private TourUserLikeTravelNotesService tourUserLikeTravelNotesService;
|
|
|
+ @Autowired
|
|
|
+ private TourismProjectTravelNotesWriteService tourismProjectTravelNotesWriteService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -144,7 +148,7 @@ public class WebsiteTourismProjectTravelNotesController {
|
|
|
*/
|
|
|
@OperationLog(type = SysOperationLogType.LIST)
|
|
|
@GetMapping("/userCollectTravelNotesList")
|
|
|
- public ResponseResult<List<TourTourismProjectTravelNotes>> userCollectTravelNotesList(PageDto pageDto) {
|
|
|
+ public ResponseResult<MyPageData<TourUserLikeTravelNotes>> userCollectTravelNotesList(PageDto pageDto) {
|
|
|
|
|
|
MyOrderParam myOrderParam = new MyOrderParam();
|
|
|
myOrderParam.add(new MyOrderParam.OrderInfo("updateTime",false,null));
|
|
@@ -155,17 +159,31 @@ public class WebsiteTourismProjectTravelNotesController {
|
|
|
if(pageDto.getPageSize() != null && pageDto.getPageNum() != null){
|
|
|
PageMethod.startPage(pageDto.getPageNum(), pageDto.getPageSize(), true);
|
|
|
}
|
|
|
- List<TourUserLikeTravelNotes> tourUserLikeTravelNotesList = tourUserLikeTravelNotesService.getTourUserLikeTravelNotesList(filter, orderBy);
|
|
|
- List<TourTourismProjectTravelNotes> tourTourismProjectTravelNotesList = new ArrayList<>();
|
|
|
- if(CollectionUtils.isNotEmpty(tourUserLikeTravelNotesList)) {
|
|
|
- for(TourUserLikeTravelNotes item:tourUserLikeTravelNotesList){
|
|
|
- TourTourismProjectTravelNotes tourTourismProjectTravelNotes = tourTourismProjectTravelNotesService.getById(item.getId());
|
|
|
- if(tourTourismProjectTravelNotes != null){
|
|
|
- tourTourismProjectTravelNotesList.add(tourTourismProjectTravelNotes);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return ResponseResult.success(tourTourismProjectTravelNotesList);
|
|
|
+ List<TourUserLikeTravelNotes> tourUserLikeTravelNotesList = tourUserLikeTravelNotesService.getTourUserLikeTravelNotesWithRelationWriteList(filter, UnmountState.LISTING, orderBy);
|
|
|
+
|
|
|
+ //游记查询notes表
|
|
|
+// List<TourTourismProjectTravelNotes> tourTourismProjectTravelNotesList = new ArrayList<>();
|
|
|
+// if(CollectionUtils.isNotEmpty(tourUserLikeTravelNotesList)) {
|
|
|
+// for(TourUserLikeTravelNotes item:tourUserLikeTravelNotesList){
|
|
|
+// TourTourismProjectTravelNotes tourTourismProjectTravelNotes = tourTourismProjectTravelNotesService.getById(item.getTravelNotesId());
|
|
|
+// if(tourTourismProjectTravelNotes != null){
|
|
|
+// tourTourismProjectTravelNotesList.add(tourTourismProjectTravelNotes);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+ //游记查询write表 tourismProjectTravelNotesWriteService
|
|
|
+// List<TourismProjectTravelNotesWrite> tourismProjectTravelNotesWriteList = new ArrayList<>();
|
|
|
+// if(CollectionUtils.isNotEmpty(tourUserLikeTravelNotesList)) {
|
|
|
+// for(TourUserLikeTravelNotes item:tourUserLikeTravelNotesList){
|
|
|
+// TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite = tourismProjectTravelNotesWriteService.getTourismProjectTravelNotesWriteListWithRelation(item.getTravelNotesId());
|
|
|
+// if(tourismProjectTravelNotesWrite != null){
|
|
|
+// tourismProjectTravelNotesWriteList.add(tourismProjectTravelNotesWrite);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+ return ResponseResult.success(MyPageUtil.makeResponseData(tourUserLikeTravelNotesList));
|
|
|
}
|
|
|
|
|
|
|