|
|
@@ -121,7 +121,32 @@ class MovieRepository extends BaseRepository
|
|
121
|
121
|
*/
|
|
122
|
122
|
public function getSchedSeat($relation_id = '', $sched_sign = '')
|
|
123
|
123
|
{
|
|
124
|
|
- return DouHuoMallFilmApiRequest::getSchedSeat($relation_id, $sched_sign);
|
|
|
124
|
+ $result = DouHuoMallFilmApiRequest::getSchedSeat($relation_id, $sched_sign);
|
|
|
125
|
+
|
|
|
126
|
+ $schedSeatList = (isset($result['code']) && ($result['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE))
|
|
|
127
|
+ ? $result['data']['list'] : [];
|
|
|
128
|
+ foreach ($schedSeatList as $key => $value) {
|
|
|
129
|
+ $tmpprice = json_decode($value['price'],true);
|
|
|
130
|
+ if (isset($tmpprice['P2'])) {
|
|
|
131
|
+ $price = $tmpprice['P2'];
|
|
|
132
|
+ } elseif (isset($tmpprice['P1'])) {
|
|
|
133
|
+ $price = $tmpprice['P1'];
|
|
|
134
|
+ } elseif (isset($tmpprice['P0'])) {
|
|
|
135
|
+ $price = $tmpprice['P0'];
|
|
|
136
|
+ } else {
|
|
|
137
|
+ $price = 0.00;
|
|
|
138
|
+ }
|
|
|
139
|
+ unset($schedSeatList[$key]['price']);
|
|
|
140
|
+
|
|
|
141
|
+ $pcYanglaojinGongxian = self::getPvYanglaojinScore($price);
|
|
|
142
|
+ $schedSeatList[$key]['price'] = $pcYanglaojinGongxian['cost_price'];
|
|
|
143
|
+ $schedSeatList[$key]['yanglaojin'] = $pcYanglaojinGongxian['yanglaojin'];
|
|
|
144
|
+ $schedSeatList[$key]['pv'] = $pcYanglaojinGongxian['pv'];
|
|
|
145
|
+ $schedSeatList[$key]['score'] = $pcYanglaojinGongxian['score'];
|
|
|
146
|
+ $schedSeatList[$key]['gongxian'] = $pcYanglaojinGongxian['gongxian'];
|
|
|
147
|
+ }
|
|
|
148
|
+
|
|
|
149
|
+ return $schedSeatList;
|
|
125
|
150
|
}
|
|
126
|
151
|
|
|
127
|
152
|
/**
|