|
|
@@ -47,7 +47,7 @@ class CinemaSchedRepository extends BaseRepository
|
|
47
|
47
|
$show_date[$key]['date'] = date('m-d', $value['show_date']);
|
|
48
|
48
|
}
|
|
49
|
49
|
|
|
50
|
|
- return compact('show_date');
|
|
|
50
|
+ return $show_date;
|
|
51
|
51
|
}
|
|
52
|
52
|
|
|
53
|
53
|
/**
|
|
|
@@ -65,7 +65,7 @@ class CinemaSchedRepository extends BaseRepository
|
|
65
|
65
|
*/
|
|
66
|
66
|
public function getFilmSched($page, $limit, $film_sign, $longitude, $latitude, $show_date, $with = [], $order = 1)
|
|
67
|
67
|
{
|
|
68
|
|
- $field = 'cinema_sign,cinema_name,address,cost_price,longitude,latitude';
|
|
|
68
|
+ $field = 'sched_sign,cinema_sign,cinema_name,address,show_date,cost_price,longitude,latitude';
|
|
69
|
69
|
$where = ['film_sign' => $film_sign, 'show_date' => $show_date];
|
|
70
|
70
|
|
|
71
|
71
|
$cinema_sched = $this->dao->search(null, $where)->when($with, function ($query) use ($with) {
|
|
|
@@ -83,6 +83,10 @@ class CinemaSchedRepository extends BaseRepository
|
|
83
|
83
|
})->field([$field])->select()->toArray();
|
|
84
|
84
|
foreach ($cinema_sched as $key => $value) {
|
|
85
|
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']);
|
|
|
87
|
+
|
|
|
88
|
+ $pcYanglaojinGongxian = MovieRepository::getPvYanglaojinScore($value['cost_price']);
|
|
|
89
|
+ $cinema_sched[$key]['cost_price'] = $pcYanglaojinGongxian['cost_price'];
|
|
86
|
90
|
}
|
|
87
|
91
|
|
|
88
|
92
|
$count = $this->dao->search(null, $where)->when($with, function ($query) use ($with) {
|
|
|
@@ -108,7 +112,7 @@ class CinemaSchedRepository extends BaseRepository
|
|
108
|
112
|
public function getCinemaFilmSched($page, $limit, $cinema_sign, $film_sign, $show_date)
|
|
109
|
113
|
{
|
|
110
|
114
|
$field = 'relation_id,sched_sign,film_sign,film_name,show_date,show_time,cinema_sign,cinema_name,hall_sign,hall_name,cost_price';
|
|
111
|
|
- $where = ['cinema_sign' => $cinema_sign, 'film_sign' => $film_sign, 'show_date' => $show_date];
|
|
|
115
|
+ $where = ['cinema_sign' => $cinema_sign, 'film_sign' => $film_sign, 'show_date' => strtotime($show_date)];
|
|
112
|
116
|
|
|
113
|
117
|
$cinema_sched = $this->dao->search(null, $where)
|
|
114
|
118
|
->when($page && $limit, function ($query) use ($page, $limit) {
|
|
|
@@ -122,7 +126,6 @@ class CinemaSchedRepository extends BaseRepository
|
|
122
|
126
|
$cinema_sched[$key]['pv'] = $pcYanglaojinGongxian['pv'];
|
|
123
|
127
|
$cinema_sched[$key]['score'] = $pcYanglaojinGongxian['score'];
|
|
124
|
128
|
$cinema_sched[$key]['gongxian'] = $pcYanglaojinGongxian['gongxian'];
|
|
125
|
|
- $cinema_sched[$key]['distance'] = isset($value['distance']) ? round($value['distance'] / 1000, 2) : 0.00;
|
|
126
|
129
|
}
|
|
127
|
130
|
|
|
128
|
131
|
$count = $this->dao->search(null, $where)->count();
|