소스 검색

Merge branch 'quickapp_fly' of iqiyoo:zhuishuyun_wap into kuaiyingyon_0820

onlinetest 4 년 전
부모
커밋
dabdf08924
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      app/Modules/Book/Services/BookConfigService.php

+ 4 - 1
app/Modules/Book/Services/BookConfigService.php

@@ -474,7 +474,10 @@ class BookConfigService
      */
     public static function findFreeBookConfig(int $sex)
     {
-        return FreeBookConfig::where(['sex' => $sex, 'is_enabled' => 1])->orderBy('end_time')->first();
+        return FreeBookConfig::where(['sex' => $sex, 'is_enabled' => 1])
+            ->where('end_time', '>=', now())
+            ->orderBy('end_time')
+            ->first();
     }
 
     /**