diff --git a/src/main/java/com/yxt/yythmall/biz/customerstore/CustomerStoreService.java b/src/main/java/com/yxt/yythmall/biz/customerstore/CustomerStoreService.java index f974f95..7b87102 100644 --- a/src/main/java/com/yxt/yythmall/biz/customerstore/CustomerStoreService.java +++ b/src/main/java/com/yxt/yythmall/biz/customerstore/CustomerStoreService.java @@ -159,16 +159,20 @@ public class CustomerStoreService extends MybatisBaseService().eq("unavailableTime",start)); - i++; - } while (cannotReserveDictionary!=null); - if(i>=5){ - start=""; + cannotReserveDictionary=cannotReserveDictionaryService.getOne(new QueryWrapper().eq("unavailableTime",start)); + if(null!=cannotReserveDictionary){ + int i=0; + do { + SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); + cannotReserveDictionary=cannotReserveDictionaryService.getOne(new QueryWrapper().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; }