Authored by chenchao

fix time convert bug

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