Browse Source

Merge branch 'quickapp_fly' of iqiyoo:zhuishuyun_wap into kuaiyingyon_0820

onlinetest 4 years ago
parent
commit
dabdf08924
1 changed files with 4 additions and 1 deletions
  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();
     }
 
     /**