预约日期
This commit is contained in:
@@ -159,17 +159,21 @@ public class CustomerStoreService extends MybatisBaseService<CustomerStoreMapper
|
|||||||
}
|
}
|
||||||
public String reserveDate(String start){
|
public String reserveDate(String start){
|
||||||
CannotReserveDictionary cannotReserveDictionary=new CannotReserveDictionary();
|
CannotReserveDictionary cannotReserveDictionary=new CannotReserveDictionary();
|
||||||
|
cannotReserveDictionary=cannotReserveDictionaryService.getOne(new QueryWrapper<CannotReserveDictionary>().eq("unavailableTime",start));
|
||||||
|
if(null!=cannotReserveDictionary){
|
||||||
int i=0;
|
int i=0;
|
||||||
do {
|
do {
|
||||||
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
|
||||||
start=sdf.format(DateUtil.offsetDay(DateUtil.parse(start),+1));
|
|
||||||
cannotReserveDictionary=cannotReserveDictionaryService.getOne(new QueryWrapper<CannotReserveDictionary>().eq("unavailableTime",start));
|
cannotReserveDictionary=cannotReserveDictionaryService.getOne(new QueryWrapper<CannotReserveDictionary>().eq("unavailableTime",start));
|
||||||
|
if(null!=cannotReserveDictionary){
|
||||||
|
start=sdf.format(DateUtil.offsetDay(DateUtil.parse(start),+1));
|
||||||
|
}
|
||||||
i++;
|
i++;
|
||||||
} while (cannotReserveDictionary!=null);
|
} while (cannotReserveDictionary!=null);
|
||||||
if(i>=5){
|
if(i>=5){
|
||||||
start="";
|
start="";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return start;
|
return start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user