Browse Source

[fix]
1、修改注解

chenchen 4 months ago
parent
commit
a6bc3121aa

+ 5 - 5
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/WebSiteTourismTravelNotesPublishController.java

@@ -95,7 +95,7 @@ public class WebSiteTourismTravelNotesPublishController {
     @GetMapping("/getDraftList")
     public ResponseResult<MyPageData<TourismProjectTravelNotesWriteVo>> getDraftList(@Validated TourismProjectTravelNotesWriteDetailPageDto pageDto) {
         if (pageDto.getType() == null) {
-            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED);
+            return ResponseResult.success(null);
         }
         Long userId = TokenData.takeFromRequest().getUserId();
         TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite = new TourismProjectTravelNotesWrite();
@@ -124,7 +124,7 @@ public class WebSiteTourismTravelNotesPublishController {
 
         TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite = tourismProjectTravelNotesWriteService.getByIdWithRelation(writeId,MyRelationParam.full());
         if(tourismProjectTravelNotesWrite == null){
-            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_FOUND);
+            return ResponseResult.success(null);
         }
         TourismProjectTravelNotesWriteVo tourismProjectTravelNotesWriteVo = MyModelUtil.copyTo(tourismProjectTravelNotesWrite, TourismProjectTravelNotesWriteVo.class);
         return ResponseResult.success(tourismProjectTravelNotesWriteVo);
@@ -137,7 +137,7 @@ public class WebSiteTourismTravelNotesPublishController {
      */
     @OperationLog(type = SysOperationLogType.DELETE)
     @PostMapping("/removeByDraftId")
-    public ResponseResult<Void> removeByDraftId(@MyRequestBody Long writeId) {
+    public ResponseResult<Void> removeByDraftId(@RequestBody Long writeId) {
         tourismProjectTravelNotesWriteService.remove(writeId);
         tourismTravelNotesContentWriteService.removeByAssociationId(writeId);
         return ResponseResult.success();
@@ -150,10 +150,10 @@ public class WebSiteTourismTravelNotesPublishController {
      */
     @OperationLog(type = SysOperationLogType.PUBLISH)
     @PostMapping("/publishDraft")
-    public ResponseResult<Void> publishDraft(@MyRequestBody TourismProjectTravelNotesWriteDto tourismProjectTravelNotesWriteDto) {
+    public ResponseResult<Void> publishDraft(@RequestBody TourismProjectTravelNotesWriteDto tourismProjectTravelNotesWriteDto) {
         String errorMessage = MyCommonUtil.getModelValidationError(tourismProjectTravelNotesWriteDto);
         if (errorMessage != null) {
-            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+            return ResponseResult.success(null);
         }
         TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite =
                 MyModelUtil.copyTo(tourismProjectTravelNotesWriteDto, TourismProjectTravelNotesWrite.class);