Commit 031d7ffc authored by 周健威's avatar 周健威

修改bug

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