family 1 год назад
Родитель
Сommit
4ee44f28e8

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

@@ -80,7 +80,7 @@ class CinemaSchedRepository extends BaseRepository
80
             } else {//播放日期
80
             } else {//播放日期
81
                 $query->order('show_date desc');
81
                 $query->order('show_date desc');
82
             }
82
             }
83
-        })->field([$field])->select()->toArray();
83
+        })->field([$field])->group('cinema_sign')->select()->toArray();
84
         foreach ($cinema_sched as $key => $value) {
84
         foreach ($cinema_sched as $key => $value) {
85
             $cinema_sched[$key]['distance'] = isset($value['distance']) ? round($value['distance'] / 1000, 2) : 0.00;
85
             $cinema_sched[$key]['distance'] = isset($value['distance']) ? round($value['distance'] / 1000, 2) : 0.00;
86
             $cinema_sched[$key]['show_date'] = date('m-d', $value['show_date']);
86
             $cinema_sched[$key]['show_date'] = date('m-d', $value['show_date']);
@@ -93,7 +93,7 @@ class CinemaSchedRepository extends BaseRepository
93
             $query->with($with);
93
             $query->with($with);
94
         })->when($latitude && $longitude, function ($query) use ($field, $longitude, $latitude) {
94
         })->when($latitude && $longitude, function ($query) use ($field, $longitude, $latitude) {
95
             $query->field([$field, $this->distance($latitude, $longitude)]);
95
             $query->field([$field, $this->distance($latitude, $longitude)]);
96
-        })->count();
96
+        })->group('cinema_sign')->count();
97
 
97
 
98
         return compact('cinema_sched', 'count');
98
         return compact('cinema_sched', 'count');
99
     }
99
     }

+ 2 - 2
app/controller/api/movie/Movie.php

@@ -113,7 +113,7 @@ class Movie extends BaseController
113
     }
113
     }
114
 
114
 
115
     /**
115
     /**
116
-     * 获取影片场次列表
116
+     * 根据影片、排片日期-获取影院列表
117
      *
117
      *
118
      * @return mixed
118
      * @return mixed
119
      */
119
      */
@@ -135,7 +135,7 @@ class Movie extends BaseController
135
     }
135
     }
136
 
136
 
137
     /**
137
     /**
138
-     * 影院影片场次列表
138
+     * 根据影片、影院、排片日期-获取场次列表
139
      *
139
      *
140
      * @return mixed
140
      * @return mixed
141
      */
141
      */