Parcourir la source

调整查询条件

family il y a 1 an
Parent
commit
5e277abb81

+ 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) {