From 490af83778a1fb0e851d0894031e1bdbcfbda23d Mon Sep 17 00:00:00 2001 From: wangpengfei <1928057482@qq.com> Date: Fri, 2 Feb 2024 17:06:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=BA=A6=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerstore/CustomerStoreService.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) 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; }