Procházet zdrojové kódy

fixed 预约已过期就不再显示,控制台打印SQL配置

fushengqian před 10 měsíci
rodič
revize
157a604f7a

+ 11 - 8
fuint-application/src/main/java/com/fuint/common/service/impl/BookServiceImpl.java

@@ -180,13 +180,16 @@ public class BookServiceImpl extends ServiceImpl<MtBookMapper, MtBook> implement
             if (dates.size() > 0) {
                 for (String date : dates) {
                     Date currentDate = DateUtil.parseDate(date);
-                    SimpleDateFormat format = new SimpleDateFormat("EEEE", Locale.CHINA);
-                    String week = format.format(currentDate);
-                    DayDto day = new DayDto();
-                    day.setWeek(week);
-                    day.setDate(DateUtil.formatDate(currentDate, "MM-dd"));
-                    day.setEnable(true);
-                    dateList.add(day);
+                    Date now = new Date();
+                    if (now.before(currentDate)) {
+                        SimpleDateFormat format = new SimpleDateFormat("EEEE", Locale.CHINA);
+                        String week = format.format(currentDate);
+                        DayDto day = new DayDto();
+                        day.setWeek(week);
+                        day.setDate(DateUtil.formatDate(currentDate, "MM-dd"));
+                        day.setEnable(true);
+                        dateList.add(day);
+                    }
                 }
             }
         }
@@ -194,7 +197,7 @@ public class BookServiceImpl extends ServiceImpl<MtBookMapper, MtBook> implement
 
         List<TimeDto> timeList = new ArrayList<>();
         String serviceTimes = mtBook.getServiceTimes();
-        if (StringUtil.isNotEmpty(serviceTimes)) {
+        if (StringUtil.isNotEmpty(serviceTimes) && bookDto.getDateList().size() > 0) {
             List<String> times = Arrays.asList(serviceTimes.split(",").clone());
             if (times.size() > 0) {
                 for (String time : times) {

+ 3 - 0
fuint-application/src/main/resources/application.properties

@@ -23,3 +23,6 @@ mybatis-plus.mapper-locations = classpath*:/mapper/*.xml
 
 # \u9ED8\u8BA4\u65F6\u95F4\u683C\u5F0F
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+
+# \u6570\u636E\u5E93\u65E5\u5FD7
+mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl