Эх сурвалжийг харах

[fix]
1、解决初步测试出现的报错问题-页面报错问题

chenchen 4 сар өмнө
parent
commit
e99a524a8d

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

@@ -162,7 +162,9 @@ public class WebSiteTourismTravelNotesPublishController {
         List<TourismProjectTravelNotesWriteCovertVo> dataList = tourismProjectTravelNotesWriteVoMyPageData.getDataList();
         if(CollectionUtils.isNotEmpty(dataList)){
             dataList.stream().forEach(item->{
-                item.setTourismTavelNotesUrl(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl()));
+                if(item.getTourismUrl()!= null) {
+                    item.setTourismTavelNotesUrl(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl()));
+                }
             });
         }
         return ResponseResult.success(tourismProjectTravelNotesWriteVoMyPageData);

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

@@ -179,7 +179,9 @@ public class WebsiteTourismProjectTravelNotesController {
         List<TourismProjectTravelNotesWriteVo> dataList = tourismProjectTravelNotesWriteVoMyPageData.getDataList();
         if(CollectionUtils.isNotEmpty(dataList)){
             dataList.stream().forEach(item->{
-                item.setTourismUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl()));
+                if(item.getTourismUrl() != null) {
+                    item.setTourismUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl()));
+                }
             });
         }