ソースを参照

调整查询条件

family 1 年間 前
コミット
5e277abb81
共有2 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 1 1
      app/common/model/movie/cinema/CinemaSched.php
  2. 1 1
      app/common/repositories/movie/CinemaSchedRepository.php

+ 1 - 1
app/common/model/movie/cinema/CinemaSched.php

@@ -27,7 +27,7 @@ class CinemaSched extends BaseModel
27 27
         })->when(isset($where['cinema_sign']) && $where['cinema_sign'], function ($query) use ($where) {
28 28
             $query->where('cinema_sign', $where['cinema_sign']);
29 29
         })->when(isset($where['show_date']) && $where['show_date'], function ($query) use ($where) {
30
-            $query->where('show_date', $where['show_date']);
30
+            $query->where('show_date', '>=', $where['show_date']);
31 31
         })->when(isset($where['relation_id']) && $where['relation_id'], function ($query) use ($where) {
32 32
             $query->where('relation_id', $where['relation_id']);
33 33
         })->when(isset($where['sched_sign']) && $where['sched_sign'], function ($query) use ($where) {

+ 1 - 1
app/common/repositories/movie/CinemaSchedRepository.php

@@ -40,7 +40,7 @@ class CinemaSchedRepository extends BaseRepository
40 40
     public function getFilmSchedDate($film_sign)
41 41
     {
42 42
         $field = 'show_date';
43
-        $where = [['film_sign', '=', $film_sign], ['show_date', '>=', strtotime(date('Y-m-d'))]];
43
+        $where = ['film_sign' => $film_sign, 'show_date' => strtotime(date('Y-m-d'))];
44 44
 
45 45
         $show_date = $this->dao->search(null, $where)->field([$field])->order('show_date asc')->group('show_date')->select()->toArray();
46 46
         foreach ($show_date as $key => $value) {