Browse Source

预约日期

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

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

@ -159,16 +159,20 @@ 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));
int i=0; if(null!=cannotReserveDictionary){
do { int i=0;
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); do {
start=sdf.format(DateUtil.offsetDay(DateUtil.parse(start),+1)); SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
cannotReserveDictionary=cannotReserveDictionaryService.getOne(new QueryWrapper<CannotReserveDictionary>().eq("unavailableTime",start)); cannotReserveDictionary=cannotReserveDictionaryService.getOne(new QueryWrapper<CannotReserveDictionary>().eq("unavailableTime",start));
i++; if(null!=cannotReserveDictionary){
} while (cannotReserveDictionary!=null); start=sdf.format(DateUtil.offsetDay(DateUtil.parse(start),+1));
if(i>=5){ }
start=""; i++;
} while (cannotReserveDictionary!=null);
if(i>=5){
start="";
}
} }
return start; return start;
} }

Loading…
Cancel
Save