瀏覽代碼

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)
     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();
     }
     }
 
 
     /**
     /**