Commit 844947d8 authored by jiaorz's avatar jiaorz

Merge remote-tracking branch 'origin/dev' into dev

parents ab0373d3 b33627fd
......@@ -55,7 +55,7 @@ public class OrderItemBiz extends BaseBiz<OrderItemMapper,OrderItem> {
//根据延期的天数算出 对应的日期价格
Date overStart = DateUtil.offsetDay(endDate, 1);
Date overEnd = DateUtil.offsetDay(endDate, overDays);
List<VehicleModelCalendarPriceDTO> overlist = vehicleFeign.findVehicleModelCalendarPriceByDate(overStart, overEnd, modelId, userId);
List<VehicleModelCalendarPriceDTO> overlist = vehicleFeign.findVehicleModelCalendarPriceByDate(overStart, overEnd, modelId, userId).getData();
for(VehicleModelCalendarPriceDTO vmcpd : overlist) {
overAmountList.add((VMCalendarPriceCostDTO) vmcpd);
......
......@@ -238,7 +238,7 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
VehicleModel vehicleModel = vehicleFeign.get(detail.getModelId()).getData();
detail.initDate();
List<VehicleModelCalendarPriceDTO> vmcpds = vehicleFeign.findVehicleModelCalendarPriceByDate(detail.getStartDate(), detail.getEndDate(), detail.getModelId(), dto.getUserid());
List<VehicleModelCalendarPriceDTO> vmcpds = vehicleFeign.findVehicleModelCalendarPriceByDate(detail.getStartDate(), detail.getEndDate(), detail.getModelId(), dto.getUserid()).getData();
//设置Item
......
......@@ -12,12 +12,10 @@ import com.xxfc.platform.vehicle.pojo.vo.AccompanyingItemVo;
import com.xxfc.platform.vehicle.pojo.vo.BranComanyLeaderVo;
import com.xxfc.platform.vehicle.pojo.vo.BranchCompanyListVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
/**
* Created by ace on 2017/9/15.
......@@ -190,11 +188,11 @@ public interface VehicleFeign {
* @param userId
* @return
*/
@GetMapping("/vehicle_model/calendar_price/app/unauth/price")
List<VehicleModelCalendarPriceDTO> findVehicleModelCalendarPriceByDate(@RequestParam(value = "startDate") Date startDate,
@RequestParam(value = "endDate") Date endDate,
@RequestParam(value = "vehicleModelId") Integer vehicleModelId,
@RequestParam(value = "userId") Integer userId);
@GetMapping(value = "/vehicle_model/calendar_price/app/unauth/price",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
ObjectRestResponse<List<VehicleModelCalendarPriceDTO>> findVehicleModelCalendarPriceByDate(@RequestParam(value = "startDate") Date startDate,
@RequestParam(value = "endDate") Date endDate,
@RequestParam(value = "vehicleModelId") Integer vehicleModelId,
@RequestParam(value = "userId") Integer userId);
@GetMapping(value = "/bookRecord/get")
public ObjectRestResponse<List<BookRecordUpdateLog>> get(@RequestParam(value = "bookRecordId")Long bookRecordId);
......
package com.xxfc.platform.vehicle.pojo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......
......@@ -12,6 +12,7 @@ import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
......@@ -51,13 +52,13 @@ public class VehicleModelCalendarPriceController {
return ObjectRestResponse.succ(vehicleModelCalendarPriceVos);
}
@GetMapping("/price")
public List<VehicleModelCalendarPriceDTO> findVehicleModelCalendarPriceByDate(@RequestParam(value = "startDate") Date startDate,
@RequestParam(value = "endDate") Date endDate,
@RequestParam(value = "vehicleModelId") Integer vehicleModelId,
@RequestParam(value = "userId") Integer userId) {
@GetMapping(value = "/price",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ObjectRestResponse<List<VehicleModelCalendarPriceDTO>> findVehicleModelCalendarPriceByDate(@RequestParam(value = "startDate") Date startDate,
@RequestParam(value = "endDate") Date endDate,
@RequestParam(value = "vehicleModelId") Integer vehicleModelId,
@RequestParam(value = "userId") Integer userId) {
startDate = Date.from(startDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().atStartOfDay(ZoneId.systemDefault()).toInstant());
endDate = Date.from(endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().atStartOfDay(ZoneId.systemDefault()).toInstant());
return vehicleModelCalendarPriceBiz.findVehicleModelCalendarPriceByDateAndVehilceIdAndUserId(startDate, endDate, vehicleModelId, userId);
return ObjectRestResponse.succ(vehicleModelCalendarPriceBiz.findVehicleModelCalendarPriceByDateAndVehilceIdAndUserId(startDate, endDate, vehicleModelId, userId));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment