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

[fix]
1、 完善接口名称

chenchen 5 сар өмнө
parent
commit
4826babcbe

+ 10 - 11
application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/TourismProjectToWebServiceImpl.java

@@ -194,7 +194,7 @@ public class TourismProjectToWebServiceImpl implements TourismProjectToWebServic
     }
 
     @Override
-    public void bookProject(HttpServletRequest request,@MyRequestBody TourismBookProjectDto tourismBookProjectDto) {
+    public void bookProject(HttpServletRequest request,@MyRequestBody TourismBookProjectDto tourBookInfoDto) {
         //获取用户的手机号
         Long userId = TokenData.takeFromRequest().getUserId();
         TourUser tourUser = tourUserService.getById(userId);
@@ -202,25 +202,24 @@ public class TourismProjectToWebServiceImpl implements TourismProjectToWebServic
 
         //根据当前日期,查询当天的项目日历价格
         TourismDatePrice tourismDatePrice = new TourismDatePrice();
-//        tourismDatePrice.setDepartureDate(MyDateUtil.truncateToDay(new Date()));
-        tourismDatePrice.setProjectId(tourismBookProjectDto.getProjectId());
-        tourismDatePrice.setDepartureDate(tourismBookProjectDto.getStartDate());
+        tourismDatePrice.setProjectId(tourBookInfoDto.getProjectId());
+        tourismDatePrice.setDepartureDate(tourBookInfoDto.getStartDate());
         TourismDatePrice tourismDatePriceOne = tourismDatePriceService.getOne(tourismDatePrice);
 
         //构建预定的数据进行保存
         TourBookInfo tourBookInfo = new TourBookInfo();
-        tourBookInfo.setType(tourismBookProjectDto.getType());
-        tourBookInfo.setProjectId(tourismBookProjectDto.getProjectId());
-        tourBookInfo.setAdultNumber(tourismBookProjectDto.getAdultNumber());
-        tourBookInfo.setChildrenNumber(tourismBookProjectDto.getChildrenNumber());
+        tourBookInfo.setType(tourBookInfoDto.getType());
+        tourBookInfo.setProjectId(tourBookInfoDto.getProjectId());
+        tourBookInfo.setAdultNumber(tourBookInfoDto.getAdultNumber());
+        tourBookInfo.setChildrenNumber(tourBookInfoDto.getChildrenNumber());
         tourBookInfo.setAdultPrice(tourismDatePriceOne.getAdultPrice());
         tourBookInfo.setChildrenPrice(tourismDatePriceOne.getChildrenPrice());
         tourBookInfo.setBookMobile(mobile);
         tourBookInfo.setBookName(mobile);
         tourBookInfo.setIsHandle("0");
-        tourBookInfo.setBookTime(tourismBookProjectDto.getStartDate());
-        tourBookInfo.setTotalPrice( tourismDatePriceOne.getAdultPrice().multiply(BigDecimal.valueOf(tourismBookProjectDto.getAdultNumber()))
-                .add(tourismDatePriceOne.getChildrenPrice().multiply(BigDecimal.valueOf(tourismBookProjectDto.getChildrenNumber()))));
+        tourBookInfo.setBookTime(tourBookInfoDto.getStartDate());
+        tourBookInfo.setTotalPrice( tourismDatePriceOne.getAdultPrice().multiply(BigDecimal.valueOf(tourBookInfoDto.getAdultNumber()))
+                .add(tourismDatePriceOne.getChildrenPrice().multiply(BigDecimal.valueOf(tourBookInfoDto.getChildrenNumber()))));
         tourBookInfo.setBookIp(IpUtil.getRemoteIpAddress(request));
 
         tourBookInfoService.saveNew(tourBookInfo);