Commit 06f99060 authored by 周健威's avatar 周健威

修改bug

parent 774ed803
......@@ -238,7 +238,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
List<VehicleModelCalendarPrice> vehicleModelCalendarPrices = getVehicleModelCalendarPricesByVehicleModelIdAndDate(vehicleModelId, startDate, endDate);
Map<Date, VehicleModelCalendarPrice> calendarPriceMap = vehicleModelCalendarPrices.stream().collect(Collectors.toMap(VehicleModelCalendarPrice::getVehicleModelDay, Function.identity()));
//节假日转map
List<VehicleModelHolidayPriceDTO> vehicleModelHolidayPrices = vehicleModelHolidayPriceBiz.findVehicleModelHolidayPriceByMonth(startDate, endDate);
List<VehicleModelHolidayPriceDTO> vehicleModelHolidayPrices = vehicleModelHolidayPriceBiz.findVehicleModelHolidayPriceByMonth(vehicleModelId, startDate, endDate);
Map<Date, VehicleModelHolidayPriceDTO> festivalDayMap = vehicleModelHolidayPrices.stream().collect(Collectors.toMap(VehicleModelHolidayPriceDTO::getFestivalDay, Function.identity()));
Map<Integer, Integer> levelAndDiscountMap = userFeign.levels().stream().collect(Collectors.toMap(BaseUserMemberLevel::getLevel, BaseUserMemberLevel::getDiscount));
......
......@@ -149,12 +149,13 @@ public class VehicleModelHolidayPriceBiz extends BaseBiz<VehicleModelHolidayPric
* @param endDate
* @return
*/
public List<VehicleModelHolidayPriceDTO> findVehicleModelHolidayPriceByMonth(Date startDate, Date endDate) {
public List<VehicleModelHolidayPriceDTO> findVehicleModelHolidayPriceByMonth(Integer vehicleModelId, Date startDate, Date endDate) {
List<VehicleModelHolidayPriceDTO> vehicleModelHolidayPriceDTOS = new ArrayList<>();
Example example = new Example(VehicleModelHolidayPrice.class);
Example.Criteria criteria = example.createCriteria();
criteria.andBetween("festivalDay", startDate, endDate);
criteria.andEqualTo("isDel",0);
criteria.andEqualTo("vehicleModelId", vehicleModelId);
List<VehicleModelHolidayPrice> modelHolidayPrices = mapper.selectByExample(example);
if (CollectionUtils.isEmpty(modelHolidayPrices)) {
return vehicleModelHolidayPriceDTOS;
......
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