Browse Source

预约日期

master
wangpengfei 1 year ago
parent
commit
490af83778
  1. 8
      src/main/java/com/yxt/yythmall/biz/customerstore/CustomerStoreService.java

8
src/main/java/com/yxt/yythmall/biz/customerstore/CustomerStoreService.java

@ -159,17 +159,21 @@ public class CustomerStoreService extends MybatisBaseService<CustomerStoreMapper
}
public String reserveDate(String start){
CannotReserveDictionary cannotReserveDictionary=new CannotReserveDictionary();
cannotReserveDictionary=cannotReserveDictionaryService.getOne(new QueryWrapper<CannotReserveDictionary>().eq("unavailableTime",start));
if(null!=cannotReserveDictionary){
int i=0;
do {
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));
if(null!=cannotReserveDictionary){
start=sdf.format(DateUtil.offsetDay(DateUtil.parse(start),+1));
}
i++;
} while (cannotReserveDictionary!=null);
if(i>=5){
start="";
}
}
return start;
}
}

Loading…
Cancel
Save