...
|
...
|
@@ -126,14 +126,19 @@ public class DeliveryMinutesService { |
|
|
|
|
|
private static int getMinutes(LimitTime limitTime){
|
|
|
int minutes;
|
|
|
switch (limitTime.getTimeUnit()){
|
|
|
case HOURS:
|
|
|
default:
|
|
|
minutes = limitTime.getLimitTime()*60;
|
|
|
break;
|
|
|
case MINUTES:
|
|
|
minutes = limitTime.getLimitTime();
|
|
|
break;
|
|
|
TimeUnit timeUnit;
|
|
|
if (Objects.nonNull(timeUnit=limitTime.getTimeUnit())) {
|
|
|
switch (timeUnit) {
|
|
|
case HOURS:
|
|
|
default:
|
|
|
minutes = limitTime.getLimitTime() * 60;
|
|
|
break;
|
|
|
case MINUTES:
|
|
|
minutes = limitTime.getLimitTime();
|
|
|
break;
|
|
|
}
|
|
|
}else{
|
|
|
minutes = limitTime.getLimitTime() * 60;
|
|
|
}
|
|
|
return minutes;
|
|
|
}
|
...
|
...
|
|