소스 검색

[fix]
1、修改ID数据类型

limeng 4 달 전
부모
커밋
11ae46f286

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

@@ -92,10 +92,10 @@ public class WebSiteTourismTravelNotesPublishController {
             List<TourismTravelNotesContentWriteDto> travelNotesContentWriteList = tourismProjectTravelNotesWriteDto.getTravelNotesContent();
             List<TourismTravelNotesContentWrite> tourismTravelNotesContentWriteList = MyModelUtil.copyCollectionTo(travelNotesContentWriteList, TourismTravelNotesContentWrite.class);
             for (TourismTravelNotesContentWrite item : tourismTravelNotesContentWriteList) {
-                item.setAssociationId(tourismProjectTravelNotesWrite.getId());
+                item.setAssociationId(Long.parseLong(tourismProjectTravelNotesWrite.getId()));
                 item.setId(null);
             }
-            tourismTravelNotesContentWriteService.removeByAssociationId(tourismProjectTravelNotesWrite.getId());
+            tourismTravelNotesContentWriteService.removeByAssociationId(Long.parseLong(tourismProjectTravelNotesWrite.getId()));
             //查询关联数据的id,根据id进行更新数据表的数据
             tourismTravelNotesContentWriteService.saveNewBatch(tourismTravelNotesContentWriteList);
         }
@@ -228,7 +228,7 @@ public class WebSiteTourismTravelNotesPublishController {
         List<TourismTravelNotesContentWrite> tourismTravelNotesContentWriteList =
                 MyModelUtil.copyCollectionTo(tourismProjectTravelNotesWriteDto.getTravelNotesContent(), TourismTravelNotesContentWrite.class);
         for (TourismTravelNotesContentWrite item : tourismTravelNotesContentWriteList) {
-            item.setAssociationId(tourismProjectTravelNotesWrite.getId());
+            item.setAssociationId(Long.parseLong(tourismProjectTravelNotesWrite.getId()));
             item.setId(null);
         }
         tourismTravelNotesContentWriteService.saveNewBatch(tourismTravelNotesContentWriteList);

+ 1 - 1
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourismProjectTravelNotesWriteController.java

@@ -75,7 +75,7 @@ public class TourismProjectTravelNotesWriteController {
         }
         TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite = MyModelUtil.copyTo(tourismProjectTravelNotesWriteDto, TourismProjectTravelNotesWrite.class);
         tourismProjectTravelNotesWrite = tourismProjectTravelNotesWriteService.saveNew(tourismProjectTravelNotesWrite);
-        return ResponseResult.success(tourismProjectTravelNotesWrite.getId());
+        return ResponseResult.success(Long.parseLong(tourismProjectTravelNotesWrite.getId()));
     }
 
     /**