|
@@ -79,12 +79,18 @@ public class WebSiteTourismTravelNotesPublishController {
|
|
|
|
|
|
TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite =
|
|
|
tourismProjectTravelNotesWriteService.getById(tourismProjectTravelNotesWriteDto.getId());
|
|
|
+
|
|
|
+
|
|
|
//判断是新增还是更新
|
|
|
if(tourismProjectTravelNotesWrite == null){
|
|
|
TourismProjectTravelNotesWrite tourismProjectTravelNotesWriteSave =
|
|
|
MyModelUtil.copyTo(tourismProjectTravelNotesWriteDto,TourismProjectTravelNotesWrite.class);
|
|
|
+ //草稿为下架状态
|
|
|
+ tourismProjectTravelNotesWriteSave.setUnmountState(UnmountState.DELIST);
|
|
|
tourismProjectTravelNotesWrite = tourismProjectTravelNotesWriteService.saveNew(tourismProjectTravelNotesWriteSave);
|
|
|
}else {
|
|
|
+ //草稿为下架状态
|
|
|
+ tourismProjectTravelNotesWrite.setUnmountState(UnmountState.DELIST);
|
|
|
tourismProjectTravelNotesWriteService.updateById(tourismProjectTravelNotesWrite);
|
|
|
}
|
|
|
//判断内容是否为空
|
|
@@ -125,6 +131,10 @@ public class WebSiteTourismTravelNotesPublishController {
|
|
|
if(pageDto.getPageSize() != null && pageDto.getPageNum() != null){
|
|
|
PageMethod.startPage(pageDto.getPageNum(), pageDto.getPageSize(), true);
|
|
|
}
|
|
|
+ //查询已发布状态的状态,则需要state为3并且上下架状态为上架
|
|
|
+ if(pageDto.getType() == 3){
|
|
|
+ tourismProjectTravelNotesWrite.setUnmountState(UnmountState.LISTING);
|
|
|
+ }
|
|
|
List<TourismProjectTravelNotesWrite> tourismProjectTravelNotesWriteList =
|
|
|
tourismProjectTravelNotesWriteService.getTourismProjectTravelNotesWriteList(tourismProjectTravelNotesWrite, orderBy);
|
|
|
|