|
|
@@ -198,7 +198,7 @@ class MovieRepository extends BaseRepository
|
|
198
|
198
|
|
|
199
|
199
|
$_order = [
|
|
200
|
200
|
'uid' => $userinfo->uid,
|
|
201
|
|
- 'mobile' => $userinfo->phone,
|
|
|
201
|
+ 'mobile' => $params['phone'] ?? $userinfo->phone,
|
|
202
|
202
|
'order_sn' => $order_sn,
|
|
203
|
203
|
'plat_order' => $submitOrder['data']['plat_order'],
|
|
204
|
204
|
'price' => $order_price,
|
|
|
@@ -359,17 +359,31 @@ class MovieRepository extends BaseRepository
|
|
359
|
359
|
$result = DouHuoMallFilmApiRequest::getOrderInfo($order_sn);
|
|
360
|
360
|
if (!empty($result) && ($result['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
|
|
361
|
361
|
$plat_orderinfo = $result['data'];
|
|
362
|
|
- $plat_orderinfo['order_sn'] = $plat_orderinfo['third_order'];
|
|
363
|
|
- $plat_orderinfo['sched_seat'] = base64_encode(json_encode($plat_orderinfo['sched_seat'], JSON_FORCE_OBJECT));
|
|
364
|
362
|
$plat_orderinfo['order_price'] = $orderinfo['order_price'];
|
|
|
363
|
+ $plat_orderinfo['order_sn'] = $order_sn;
|
|
|
364
|
+ $plat_orderinfo['create_time'] = strtotime($orderinfo['create_time']);
|
|
|
365
|
+ $plat_orderinfo['phone'] = $orderinfo['phone'];
|
|
365
|
366
|
$plat_orderinfo['sched_seat'] = json_decode($orderinfo['sched_seat'], true);
|
|
366
|
|
- $plat_orderinfo['cinema_film'] = Db::name('movie_cinema_sched')
|
|
367
|
|
- ->where('film_sign', $orderinfo['film_sign'])
|
|
368
|
|
- ->where(['relation_id' => $orderinfo['relation_id'], 'sched_sign' => $orderinfo['sched_sign']])
|
|
369
|
|
- ->field('cinema_sign,cinema_name,address,longitude,latitude,hall_sign,hall_name,film_sign,film_name,show_date,show_time')
|
|
370
|
|
- ->find();
|
|
371
|
|
- $plat_orderinfo['cinema_film']['show_date'] = date('Y-m-d', $plat_orderinfo['cinema_film']['show_date']);
|
|
372
|
|
- $plat_orderinfo['cinema_film']['cover_img'] = Db::name('movie_film')->where('film_sign', $orderinfo['film_sign'])->value('cover_img');
|
|
|
367
|
+ $plat_orderinfo['cinema'] = [
|
|
|
368
|
+ 'cinema_sign' => $orderinfo['cinema_sign'],
|
|
|
369
|
+ 'cinema_name' => $orderinfo['cinema_name'],
|
|
|
370
|
+ 'address' => $orderinfo['address'],
|
|
|
371
|
+ 'longitude' => $orderinfo['longitude'],
|
|
|
372
|
+ 'latitude' => $orderinfo['latitude'],
|
|
|
373
|
+ 'hall_sign' => $orderinfo['hall_sign'],
|
|
|
374
|
+ 'hall_name' => $orderinfo['hall_name'],
|
|
|
375
|
+ 'tel' => Db::name('movie_cinema')->where('cinema_sign', $orderinfo['cinema_sign'])->value('tel')
|
|
|
376
|
+ ];
|
|
|
377
|
+ $film = Db::name('movie_film')->where('film_sign', $orderinfo['film_sign'])->find();
|
|
|
378
|
+ $plat_orderinfo['film'] = [
|
|
|
379
|
+ 'film_sign' => $orderinfo['film_sign'],
|
|
|
380
|
+ 'film_name' => $orderinfo['film_name'],
|
|
|
381
|
+ 'language' => $film['language'],
|
|
|
382
|
+ 'cover_img' => $film['cover_img'],
|
|
|
383
|
+ 'version' => $film['version'],
|
|
|
384
|
+ ];
|
|
|
385
|
+ $plat_orderinfo['sched_time'] = date('Y-m-d H:i', strtotime($result['data']['sched_time']));
|
|
|
386
|
+ $plat_orderinfo['schedend_time'] = date('m-d H:i', strtotime($result['data']['sched_time']) + $film['duration'] * 60);
|
|
373
|
387
|
|
|
374
|
388
|
unset($plat_orderinfo['plat_order']);
|
|
375
|
389
|
unset($plat_orderinfo['third_order']);
|