Commit babe0772 authored by hezhen's avatar hezhen

Merge branch 'master-chw-price' into dev-chw

parents 6eb0c8c8 25b3590b
......@@ -80,7 +80,7 @@ public class VehicleDaysPriceBiz extends BaseBiz<VehicleDaysPriceMapper, Vehicle
if (days == null || days == 0){
vehicleDaysPriceVo = priceVos.stream().min(Comparator.comparing(VehicleDaysPriceVo::getPrice)).get();
}else {
vehicleDaysPriceVo = priceVos.stream().filter(x -> x.getStartDay() >= days && x.getEndDay() >= days).min(Comparator.comparing(VehicleDaysPriceVo::getPrice)).get();
vehicleDaysPriceVo = priceVos.stream().filter(x -> x.getStartDay() <= days && (x.getEndDay() == -1 || x.getEndDay() >= days)).min(Comparator.comparing(VehicleDaysPriceVo::getPrice)).get();
}
if (vehicleDaysPriceVo != null )
price = vehicleDaysPriceVo.getPrice();
......
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