Browse Source

[fix]
重复预定司机bug、url转换bug

limeng 3 months ago
parent
commit
0f451f1ca6

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

@@ -146,7 +146,7 @@ public class TravelNotesCommentController {
             Map<String, Object> travelNoteDictMap = e.getTravelNoteDictMap();
             String url = null;
             if(travelNoteDictMap != null){
-                url = (String)travelNoteDictMap.get(e.getTravelNoteId());
+                url = (String)travelNoteDictMap.get("name");
             }
             e.setTravelNoteUrl(UrlConvertUtils.urlConvertSingle(applicationConfig.getHostIpPort(), url));
         });

+ 2 - 2
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/WebsiteCarOrderController.java

@@ -77,6 +77,8 @@ public class WebsiteCarOrderController {
         }
 
         TourCarOrder tourCarOrder = MyModelUtil.copyTo(tourCarOrderDto, TourCarOrder.class);
+        // 处理订单结束时间
+        tourCarOrder.setEndTime(QueryConditionProccessUtils.getEndDate(tourCarOrderDto.getStartTime(), tourCarOrderDto.getDays()));
         // 判断司机是否被其他订单占用
         boolean b = tourCarOrderService.verifyDriverOrder(tourCarOrder);
         if (b){
@@ -110,8 +112,6 @@ public class WebsiteCarOrderController {
         tourCarOrder.setDriverMobile(carDriver.getMobile());
         tourCarOrder.setDriverDeptId(carDriver.getDeptId());
         tourCarOrder.setDriverSysId(carDriver.getCreateUserId());
-        // 处理订单结束时间
-        tourCarOrder.setEndTime(QueryConditionProccessUtils.getEndDate(tourCarOrderDto.getStartTime(), tourCarOrderDto.getDays()));
 
         // 判断车型和司机是否是同一个运营商,自营、第三方
         if(carCategory.getType() == carDriver.getType()) {

+ 1 - 1
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TravelNotesCommentToWebDto.java

@@ -92,6 +92,6 @@ public class TravelNotesCommentToWebDto {
     /**
      * 评论类型。
      */
-    @Schema(description = "评论类型。0:全部;1:我收到的;2:我发出的。")
+    @Schema(description = "评论类型。0:全部;1:我发出的;2:我收到的。")
     private Integer commentType;
 }

+ 1 - 1
application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourCarOrder.java

@@ -58,7 +58,7 @@ public class TourCarOrder extends BaseModel {
      * 开始时间。
      */
     @TableField(value = "start_time")
-    private Date startTime;
+    private String startTime;
 
     /**
      * 结束时间。

+ 1 - 1
application-webadmin/src/main/java/com/tourism/webadmin/back/vo/TourTravelNotesCommentVo.java

@@ -111,5 +111,5 @@ public class TourTravelNotesCommentVo extends BaseVo {
     /**
      * 游记封面图
      */
-    private String TravelNoteUrl;
+    private String travelNoteUrl;
 }