逾期小时数取整
This commit is contained in:
@ -65,7 +65,7 @@ public class OrderUtil {
|
||||
log.info("计算时租逾期小时数,预计还车时间:{}, 当前时间 : {}", endRentTime, now);
|
||||
if(now.isAfter(endRentTime)){
|
||||
int hours = (int) ChronoUnit.HOURS.between(endRentTime, now);
|
||||
return hours == 0 ? 1 : hours;
|
||||
return hours +1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user