瀏覽代碼

锁座订单

family 1 年之前
父節點
當前提交
39e3b716f7

+ 2 - 1
app/command/CinemaSchedCommand.php

@@ -87,7 +87,8 @@ class CinemaSchedCommand extends Command
87
                     'hall_sign' => $value['hall_sign'],
87
                     'hall_sign' => $value['hall_sign'],
88
                     'hall_name' => $value['hall_name'],
88
                     'hall_name' => $value['hall_name'],
89
                     'stop_sell_time' => strtotime($value['stop_sell_time']),
89
                     'stop_sell_time' => strtotime($value['stop_sell_time']),
90
-                    'cost_price' => $value['cost_price'],
90
+                    'price' => $value['price'], // 原价
91
+                    'cost_price' => $value['cost_price'], // 销售价
91
                     'channel_price' => json_encode($value['channel_price'], JSON_FORCE_OBJECT)
92
                     'channel_price' => json_encode($value['channel_price'], JSON_FORCE_OBJECT)
92
                 ];
93
                 ];
93
                 $where = [
94
                 $where = [

+ 2 - 2
app/common/model/movie/cinema/Cinema.php

@@ -24,8 +24,8 @@ class Cinema extends BaseModel
24
 
24
 
25
         return $model->when(isset($where['cinema_name']) && $where['cinema_name'], function ($query) use ($where) {
25
         return $model->when(isset($where['cinema_name']) && $where['cinema_name'], function ($query) use ($where) {
26
             $query->where('cinema_name', 'like', "%{$where['cinema_name']}%");
26
             $query->where('cinema_name', 'like', "%{$where['cinema_name']}%");
27
-        })->when(isset($where['cate_one_id']) && $where['cate_one_id'], function ($query) use ($where) {
28
-            $query->where('cate_one_id', $where['cate_one_id']);
27
+        })->when(isset($where['cinema_sign']) && $where['cinema_sign'], function ($query) use ($where) {
28
+            $query->where('cinema_sign', $where['cinema_sign']);
29
         })->when(isset($where['cate_two_id']) && $where['cate_two_id'], function ($query) use ($where) {
29
         })->when(isset($where['cate_two_id']) && $where['cate_two_id'], function ($query) use ($where) {
30
             $query->where('cate_two_id', $where['cate_two_id']);
30
             $query->where('cate_two_id', $where['cate_two_id']);
31
         })->when(isset($where['city']) && $where['city'], function ($query) use ($where) {
31
         })->when(isset($where['city']) && $where['city'], function ($query) use ($where) {

+ 4 - 2
app/common/model/movie/cinema/CinemaSched.php

@@ -28,8 +28,10 @@ class CinemaSched extends BaseModel
28
             $query->where('cinema_sign', $where['cinema_sign']);
28
             $query->where('cinema_sign', $where['cinema_sign']);
29
         })->when(isset($where['show_date']) && $where['show_date'], function ($query) use ($where) {
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
-        })->when(isset($where['city']) && $where['city'], function ($query) use ($where) {
32
-            $query->where('city', 'like', "%{$where['city']}%");
31
+        })->when(isset($where['relation_id']) && $where['relation_id'], function ($query) use ($where) {
32
+            $query->where('relation_id', $where['relation_id']);
33
+        })->when(isset($where['sched_sign']) && $where['sched_sign'], function ($query) use ($where) {
34
+            $query->where('sched_sign', $where['sched_sign']);
33
         });
35
         });
34
     }
36
     }
35
 }
37
 }

+ 14 - 0
app/common/repositories/movie/CinemaRepository.php

@@ -85,4 +85,18 @@ class CinemaRepository extends BaseRepository
85
         return "(round(6378137 * 2 * asin(sqrt(pow(sin(((latitude * pi()) / 180 - ({$latitude} * pi()) / 180) / 2), 2) 
85
         return "(round(6378137 * 2 * asin(sqrt(pow(sin(((latitude * pi()) / 180 - ({$latitude} * pi()) / 180) / 2), 2) 
86
         + cos(({$latitude} * pi()) / 180) * cos((latitude * pi()) / 180) * pow(sin(((longitude * pi()) / 180 - ({$longitude} * pi()) / 180) / 2), 2))))) AS distance";
86
         + cos(({$latitude} * pi()) / 180) * cos((latitude * pi()) / 180) * pow(sin(((longitude * pi()) / 180 - ({$longitude} * pi()) / 180) / 2), 2))))) AS distance";
87
     }
87
     }
88
+
89
+    /**
90
+     * 获取影院信息
91
+     *
92
+     * @param $cinema_sign
93
+     * @return Cinema|array|\think\Model|null
94
+     * @throws \think\db\exception\DataNotFoundException
95
+     * @throws \think\db\exception\DbException
96
+     * @throws \think\db\exception\ModelNotFoundException
97
+     */
98
+    public function getCinemaInfo($cinema_sign)
99
+    {
100
+        return $this->dao->search(null, ['cinema_sign' => $cinema_sign])->find();
101
+    }
88
 }
102
 }

+ 21 - 6
app/common/repositories/movie/CinemaSchedRepository.php

@@ -65,7 +65,7 @@ class CinemaSchedRepository extends BaseRepository
65
      */
65
      */
66
     public function getFilmSched($page, $limit, $film_sign, $longitude, $latitude, $show_date, $with = [], $order = 1)
66
     public function getFilmSched($page, $limit, $film_sign, $longitude, $latitude, $show_date, $with = [], $order = 1)
67
     {
67
     {
68
-        $field = 'sched_sign,cinema_sign,cinema_name,address,show_date,cost_price,longitude,latitude';
68
+        $field = 'sched_sign,cinema_sign,cinema_name,address,show_date,price,longitude,latitude';
69
         $where = ['film_sign' => $film_sign, 'show_date' => $show_date];
69
         $where = ['film_sign' => $film_sign, 'show_date' => $show_date];
70
 
70
 
71
         $cinema_sched = $this->dao->search(null, $where)->when($with, function ($query) use ($with) {
71
         $cinema_sched = $this->dao->search(null, $where)->when($with, function ($query) use ($with) {
@@ -85,8 +85,8 @@ class CinemaSchedRepository extends BaseRepository
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']);
87
 
87
 
88
-            $pcYanglaojinGongxian = MovieRepository::getPvYanglaojinScore($value['cost_price']);
89
-            $cinema_sched[$key]['cost_price'] = $pcYanglaojinGongxian['cost_price'];
88
+            $pcYanglaojinGongxian = MovieRepository::getPvYanglaojinScore($value['price']);
89
+            $cinema_sched[$key]['price'] = $pcYanglaojinGongxian['cost_price'];
90
         }
90
         }
91
 
91
 
92
         $count = $this->dao->search(null, $where)->when($with, function ($query) use ($with) {
92
         $count = $this->dao->search(null, $where)->when($with, function ($query) use ($with) {
@@ -111,7 +111,7 @@ class CinemaSchedRepository extends BaseRepository
111
      */
111
      */
112
     public function getCinemaFilmSched($page, $limit, $cinema_sign, $film_sign, $show_date)
112
     public function getCinemaFilmSched($page, $limit, $cinema_sign, $film_sign, $show_date)
113
     {
113
     {
114
-        $field = 'relation_id,sched_sign,film_sign,film_name,show_date,show_time,cinema_sign,cinema_name,hall_sign,hall_name,cost_price';
114
+        $field = 'relation_id,sched_sign,film_sign,film_name,show_date,show_time,cinema_sign,cinema_name,hall_sign,hall_name,price';
115
         $where = ['cinema_sign' => $cinema_sign, 'film_sign' => $film_sign, 'show_date' => strtotime($show_date)];
115
         $where = ['cinema_sign' => $cinema_sign, 'film_sign' => $film_sign, 'show_date' => strtotime($show_date)];
116
 
116
 
117
         $cinema_sched = $this->dao->search(null, $where)
117
         $cinema_sched = $this->dao->search(null, $where)
@@ -119,9 +119,9 @@ class CinemaSchedRepository extends BaseRepository
119
                 $query->page($page, $limit);
119
                 $query->page($page, $limit);
120
             })->order('show_time asc')->field([$field])->select()->toArray();
120
             })->order('show_time asc')->field([$field])->select()->toArray();
121
         foreach ($cinema_sched as $key => $value) {
121
         foreach ($cinema_sched as $key => $value) {
122
-            $pcYanglaojinGongxian = MovieRepository::getPvYanglaojinScore($value['cost_price']);
122
+            $pcYanglaojinGongxian = MovieRepository::getPvYanglaojinScore($value['price']);
123
 
123
 
124
-            $cinema_sched[$key]['cost_price'] = $pcYanglaojinGongxian['cost_price'];
124
+            $cinema_sched[$key]['price'] = $pcYanglaojinGongxian['cost_price'];
125
             $cinema_sched[$key]['yanglaojin'] = $pcYanglaojinGongxian['yanglaojin'];
125
             $cinema_sched[$key]['yanglaojin'] = $pcYanglaojinGongxian['yanglaojin'];
126
             $cinema_sched[$key]['pv'] = $pcYanglaojinGongxian['pv'];
126
             $cinema_sched[$key]['pv'] = $pcYanglaojinGongxian['pv'];
127
             $cinema_sched[$key]['score'] = $pcYanglaojinGongxian['score'];
127
             $cinema_sched[$key]['score'] = $pcYanglaojinGongxian['score'];
@@ -144,4 +144,19 @@ class CinemaSchedRepository extends BaseRepository
144
         return "(round(6378137 * 2 * asin(sqrt(pow(sin(((latitude * pi()) / 180 - ({$latitude} * pi()) / 180) / 2), 2) 
144
         return "(round(6378137 * 2 * asin(sqrt(pow(sin(((latitude * pi()) / 180 - ({$latitude} * pi()) / 180) / 2), 2) 
145
         + cos(({$latitude} * pi()) / 180) * cos((latitude * pi()) / 180) * pow(sin(((longitude * pi()) / 180 - ({$longitude} * pi()) / 180) / 2), 2))))) AS distance";
145
         + cos(({$latitude} * pi()) / 180) * cos((latitude * pi()) / 180) * pow(sin(((longitude * pi()) / 180 - ({$longitude} * pi()) / 180) / 2), 2))))) AS distance";
146
     }
146
     }
147
+
148
+    /**
149
+     * 获取影片场次详情
150
+     *
151
+     * @param $relation_id
152
+     * @param $sched_sign
153
+     * @return CinemaSched|array|\think\Model|null
154
+     * @throws \think\db\exception\DataNotFoundException
155
+     * @throws \think\db\exception\DbException
156
+     * @throws \think\db\exception\ModelNotFoundException
157
+     */
158
+    public function getCinemaSchedInfo($relation_id, $sched_sign)
159
+    {
160
+        return $this->dao->search(null, ['relation_id' => $relation_id, 'sched_sign' => $sched_sign])->find();
161
+    }
147
 }
162
 }

+ 8 - 3
app/common/repositories/movie/DouHuoMallFilmApiRequest.php

@@ -203,11 +203,15 @@ class DouHuoMallFilmApiRequest
203
     /**
203
     /**
204
      * 锁座订单
204
      * 锁座订单
205
      *
205
      *
206
-     * @param $relation_id
206
+     * @param $phone
207
+     * @param $channel_type
207
      * @param $sched_sign
208
      * @param $sched_sign
209
+     * @param $seat_sign
210
+     * @param $third_order
211
+     * @param $order_price
208
      * @return mixed|string
212
      * @return mixed|string
209
      */
213
      */
210
-    public static function submitOrder($phone, $channel_type, $sched_sign, $third_order, $order_price)
214
+    public static function submitOrder($phone, $channel_type, $sched_sign, $seat_sign, $third_order, $order_price)
211
     {
215
     {
212
         $url = '/openapi/Movie/submitOrder';
216
         $url = '/openapi/Movie/submitOrder';
213
         $body = [
217
         $body = [
@@ -216,7 +220,8 @@ class DouHuoMallFilmApiRequest
216
             'sched_sign' => $sched_sign,
220
             'sched_sign' => $sched_sign,
217
             'third_order' => $third_order,
221
             'third_order' => $third_order,
218
             'order_price' => $order_price,
222
             'order_price' => $order_price,
219
-            'phone' => $phone
223
+            'phone' => $phone,
224
+            'seat_sign' => $seat_sign
220
         ];
225
         ];
221
 
226
 
222
         $res = self::curl_post(self::$path . $url, $body);
227
         $res = self::curl_post(self::$path . $url, $body);

+ 49 - 39
app/common/repositories/movie/MovieRepository.php

@@ -101,7 +101,7 @@ class MovieRepository extends BaseRepository
101
             foreach ($fileSchedValue as $key => $value) {
101
             foreach ($fileSchedValue as $key => $value) {
102
                 $pcYanglaojinGongxian = static::getPvYanglaojinScore($value['cost_price']);
102
                 $pcYanglaojinGongxian = static::getPvYanglaojinScore($value['cost_price']);
103
 
103
 
104
-                $fileSchedValue[$key]['cost_price'] = $pcYanglaojinGongxian['cost_price'];
104
+                $fileSchedValue[$key]['price'] = $pcYanglaojinGongxian['cost_price'];
105
                 $fileSchedValue[$key]['yanglaojin'] = $pcYanglaojinGongxian['yanglaojin'];
105
                 $fileSchedValue[$key]['yanglaojin'] = $pcYanglaojinGongxian['yanglaojin'];
106
                 $fileSchedValue[$key]['pv'] = $pcYanglaojinGongxian['pv'];
106
                 $fileSchedValue[$key]['pv'] = $pcYanglaojinGongxian['pv'];
107
                 $fileSchedValue[$key]['score'] = $pcYanglaojinGongxian['score'];
107
                 $fileSchedValue[$key]['score'] = $pcYanglaojinGongxian['score'];
@@ -126,7 +126,7 @@ class MovieRepository extends BaseRepository
126
         $schedSeatList = (isset($result['code']) && ($result['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE))
126
         $schedSeatList = (isset($result['code']) && ($result['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE))
127
             ? $result['data']['list'] : [];
127
             ? $result['data']['list'] : [];
128
         foreach ($schedSeatList as $key => $value) {
128
         foreach ($schedSeatList as $key => $value) {
129
-            $tmpprice = json_decode($value['price'],true);
129
+            $tmpprice = json_decode($value['price'], true);
130
             if (isset($tmpprice['P2'])) {
130
             if (isset($tmpprice['P2'])) {
131
                 $price = $tmpprice['P2'];
131
                 $price = $tmpprice['P2'];
132
             } elseif (isset($tmpprice['P1'])) {
132
             } elseif (isset($tmpprice['P1'])) {
@@ -144,6 +144,8 @@ class MovieRepository extends BaseRepository
144
             $schedSeatList[$key]['pv'] = $pcYanglaojinGongxian['pv'];
144
             $schedSeatList[$key]['pv'] = $pcYanglaojinGongxian['pv'];
145
             $schedSeatList[$key]['score'] = $pcYanglaojinGongxian['score'];
145
             $schedSeatList[$key]['score'] = $pcYanglaojinGongxian['score'];
146
             $schedSeatList[$key]['gongxian'] = $pcYanglaojinGongxian['gongxian'];
146
             $schedSeatList[$key]['gongxian'] = $pcYanglaojinGongxian['gongxian'];
147
+            $schedSeatList[$key]['relation_id'] = $relation_id; // 场次ID
148
+            $schedSeatList[$key]['sched_sign'] = $sched_sign; // 场次编码
147
         }
149
         }
148
 
150
 
149
         return $schedSeatList;
151
         return $schedSeatList;
@@ -151,13 +153,13 @@ class MovieRepository extends BaseRepository
151
 
153
 
152
     /**
154
     /**
153
      * 锁座订单
155
      * 锁座订单
154
-     * @param $sched_sign
155
-     * @param $seat_sign
156
-     * @param $channel_type
157
-     * @param $third_order
158
-     * @param $order_price
159
-     * @param $phone
160
-     * @return mixed|string
156
+     *
157
+     * @param $userinfo
158
+     * @param $params
159
+     * @return mixed
160
+     * @throws \think\db\exception\DataNotFoundException
161
+     * @throws \think\db\exception\DbException
162
+     * @throws \think\db\exception\ModelNotFoundException
161
      */
163
      */
162
     public function submitOrder($userinfo, $params)
164
     public function submitOrder($userinfo, $params)
163
     {
165
     {
@@ -165,49 +167,57 @@ class MovieRepository extends BaseRepository
165
         $storeOrder = app()->make(StoreOrderRepository::class);
167
         $storeOrder = app()->make(StoreOrderRepository::class);
166
         $order_sn = $storeOrder->getNewOrderId() . '0';
168
         $order_sn = $storeOrder->getNewOrderId() . '0';
167
 
169
 
168
-        $order_price = round($params['number'] * $params['price'], 2);
169
-        $submitOrder = DouHuoMallFilmApiRequest::submitOrder($userinfo->phone, $params['channel_type'], $params['sched_sign'], $order_sn, $order_price);
170
-        if (!empty($submitOrder) && isset($submitOrder['code']) && ($submitOrder['code'] == 200) && isset($submitOrder['data']['plat_order'])) {
170
+        /** @var CinemaSchedRepository $cinemaSchedRepository */
171
+        $cinemaSchedRepository = app()->make(CinemaSchedRepository::class);
172
+        $sched = $cinemaSchedRepository->getCinemaSchedInfo($params['relation_id'], $params['sched_sign']);
173
+        if (empty($sched)) throw new ValidateException('观影场次不存在');
174
+
175
+        $seat_sign = json_decode($params['seat_sign'], true);
176
+        $order_price = round($sched['price'] * count($seat_sign), 2);
177
+        $submitOrder = DouHuoMallFilmApiRequest::submitOrder($userinfo->phone, $params['channel_type'], $params['sched_sign'], $seat_sign, $order_sn, $order_price);
178
+        if (!empty($submitOrder) && isset($submitOrder['code']) && ($submitOrder['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE) && isset($submitOrder['data']['plat_order'])) {
179
+            /** @var CinemaRepository $cinemaRepository */
180
+            $cinemaRepository = app()->make(CinemaRepository::class);
181
+            $cinema = $cinemaRepository->getCinemaInfo($sched['cinema_sign']);
182
+
171
             $_order = [
183
             $_order = [
172
                 'uid' => $userinfo->uid,
184
                 'uid' => $userinfo->uid,
173
                 'mobile' => $userinfo->phone,
185
                 'mobile' => $userinfo->phone,
174
                 'order_sn' => $order_sn,
186
                 'order_sn' => $order_sn,
175
                 'plat_order' => $submitOrder['data']['plat_order'],
187
                 'plat_order' => $submitOrder['data']['plat_order'],
176
-                'price' => $params['price'],
177
-                'number' => $params['number'],
188
+                'price' => $sched['price'],
189
+                'number' => count($seat_sign),
178
                 'order_price' => $order_price,
190
                 'order_price' => $order_price,
179
                 'channel_type' => $params['channel_type'],
191
                 'channel_type' => $params['channel_type'],
180
-                'pay_type' => $params['pay_type'],
181
-                'city_sign' => $params['city_sign'],
182
-                'city_name' => $params['city_name'],
183
-                'area_code' => $params['area_code'],
184
-                'area_name' => $params['area_name'],
185
-                'cinema_sign' => $params['cinema_sign'],
186
-                'cinema_name' => $params['cinema_name'],
187
-                'address' => $params['address'],
188
-                'longitude' => $params['longitude'],
189
-                'latitude' => $params['latitude'],
190
-                'hall_sign' => $params['hall_sign'],
191
-                'hall_name' => $params['hall_name'],
192
-                'relation_id' => $params['relation_id'],
193
-                'sched_sign' => $params['sched_sign'],
194
-                'film_sign' => $params['film_sign'],
195
-                'film_name' => $params['film_name'],
196
-                'show_date' => $params['show_date'],
197
-                'show_time' => $params['show_time'],
198
-                'sched_seat' => $params['sched_seat'],
192
+                'city_sign' => $cinema['city_sign'],
193
+                'city_name' => $cinema['city_name'],
194
+                'area_code' => $cinema['area_sign'],
195
+                'area_name' => $cinema['area_name'],
196
+                'cinema_sign' => $cinema['cinema_sign'],
197
+                'cinema_name' => $cinema['cinema_name'],
198
+                'address' => $cinema['address'],
199
+                'longitude' => $cinema['longitude'],
200
+                'latitude' => $cinema['latitude'],
201
+                'hall_sign' => $sched['hall_sign'],
202
+                'hall_name' => $sched['hall_name'],
203
+                'relation_id' => $sched['relation_id'],
204
+                'sched_sign' => $sched['sched_sign'],
205
+                'film_sign' => $sched['film_sign'],
206
+                'film_name' => $sched['film_name'],
207
+                'show_date' => $sched['show_date'],
208
+                'show_time' => $sched['show_time'],
209
+                'sched_seat' => $sched['sched_seat'],
199
                 'create_time' => time()
210
                 'create_time' => time()
200
             ];
211
             ];
201
 
212
 
202
-            $group = Db::transaction(function () use ($userinfo, $_order) {
213
+            $order_sn = Db::transaction(function () use ($userinfo, $_order) {
203
                 $_order = $this->dao->create($_order);
214
                 $_order = $this->dao->create($_order);
204
-                if ($_order) return ['code' => ApiResponseService::DEFAULT_SUCCESS_CODE, 'msg' => '下单成功', 'data' => ['order_sn' => $_order['order_sn']]];
205
-
206
-                throw new ValidateException('下单失败');
215
+                if ($_order) return $_order['order_sn'];
216
+                throw new ValidateException('锁座下单失败');
207
             });
217
             });
208
-            return $group;
218
+            return $order_sn;
209
         } else {
219
         } else {
210
-            return $submitOrder;
220
+            throw new ValidateException('锁座下单失败');
211
         }
221
         }
212
     }
222
     }
213
 
223
 

+ 11 - 28
app/controller/api/movie/Movie.php

@@ -14,6 +14,7 @@ use app\common\repositories\movie\MovieRepository;
14
 use app\common\repositories\system\groupData\GroupDataRepository;
14
 use app\common\repositories\system\groupData\GroupDataRepository;
15
 use app\controller\merchant\user\User;
15
 use app\controller\merchant\user\User;
16
 use crmeb\basic\BaseController;
16
 use crmeb\basic\BaseController;
17
+use crmeb\services\ApiResponseService;
17
 use think\App;
18
 use think\App;
18
 
19
 
19
 class Movie extends BaseController
20
 class Movie extends BaseController
@@ -180,39 +181,21 @@ class Movie extends BaseController
180
     public function submitOrder()
181
     public function submitOrder()
181
     {
182
     {
182
         $params = $this->request->params(
183
         $params = $this->request->params(
183
-            ['price', 0.00],
184
-            ['number', 0],
185
-            ['channel_type', ''],
186
-            ['pay_type', ''],
187
-            ['city_sign', ''],
188
-            ['city_name', ''],
189
-            ['area_code', ''],
190
-            ['area_name', ''],
191
-            ['cinema_sign', ''],
192
-            ['cinema_name', ''],
193
-            ['address', ''],
194
-            ['longitude', ''],
195
-            ['latitude', ''],
196
-            ['hall_sign', ''],
197
-            ['hall_name', ''],
198
-            ['relation_id', ''],
199
-            ['sched_sign', ''],
200
-            ['film_sign', ''],
201
-            ['film_name', ''],
202
-            ['show_date', ''],
203
-            ['show_time', ''],
204
-            ['sched_seat', '']
184
+            ['channel_type', 'P2'],
185
+            ['relation_id', ''], // 场次ID
186
+            ['sched_sign', ''], // 场次编码
187
+            ['seat_no', ''], // 座位
188
+            ['seat_sign', ''] // 座位编码
205
         );
189
         );
206
 
190
 
207
-        if (empty($params['sched_sign'])) return app('json')->fail('请选择场次');
208
-        if (empty($params['seat_sign'])) return app('json')->fail('请选择座位');
209
-        if (empty($params['channel_type'])) return app('json')->fail('请选择购票类型');
191
+        if (empty($params['relation_id']) || empty($params['sched_sign'])) return app('json')->fail('请选择观影场次');
192
+        if (empty($params['seat_no']) || empty($params['seat_sign'])) return app('json')->fail('请选择座位');
210
 
193
 
211
         $result = $this->repository->submitOrder($this->request->userInfo(), $params);
194
         $result = $this->repository->submitOrder($this->request->userInfo(), $params);
212
-        if ($result['code'] == 200) {
213
-            return app('json')->success($result);
195
+        if (!empty($result)) {
196
+            return app('json')->success(['order_sn' => $result]);
214
         } else {
197
         } else {
215
-            return app('json')->fail($result);
198
+            return app('json')->fail('锁座下单失败');
216
         }
199
         }
217
     }
200
     }
218
 
201