Browse Source

获取场次座位按照行组织数据返回

family 1 year ago
parent
commit
c2c0b47d36

+ 0 - 1
app/command/MovieCinemaCommand.php

@@ -48,7 +48,6 @@ class MovieCinemaCommand extends Command
48 48
                 $cinemaLists = $movieRepository->getCinema($index, $limit);
49 49
                 if (isset($cinemaLists['code']) && ($cinemaLists['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
50 50
                     $this->createMovieCinema($cinemaLists['data']['list']);
51
-                    sleep(1);
52 51
                 }
53 52
             }
54 53
         }

+ 0 - 1
app/command/MovieCityAreaCommand.php

@@ -48,7 +48,6 @@ class MovieCityAreaCommand extends Command
48 48
                 $movieCityLists = $movieRepository->getMovieCity($index, $limit);
49 49
                 if (isset($movieCityLists['code']) && ($movieCityLists['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
50 50
                     $this->createMovieCity($movieCityLists['data']['list']);
51
-                    sleep(1);
52 51
                 }
53 52
             }
54 53
         }

+ 0 - 1
app/command/MovieFilmCommand.php

@@ -47,7 +47,6 @@ class MovieFilmCommand extends Command
47 47
                 $filmLists = $movieRepository->getFilm($index, $limit);
48 48
                 if (isset($filmLists['code']) && ($filmLists['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
49 49
                     $this->createMovieFilm($filmLists['data']['list']);
50
-                    sleep(1);
51 50
                 }
52 51
             }
53 52
         }

+ 5 - 1
app/common/repositories/movie/MovieRepository.php

@@ -123,6 +123,7 @@ class MovieRepository extends BaseRepository
123 123
     {
124 124
         $result = DouHuoMallFilmApiRequest::getSchedSeat($relation_id, $sched_sign);
125 125
 
126
+        $seat = [];
126 127
         $schedSeatList = (isset($result['code']) && ($result['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) ? $result['data'] : [];
127 128
         foreach ($schedSeatList as $key => $value) {
128 129
             $tmpprice = [];
@@ -142,9 +143,12 @@ class MovieRepository extends BaseRepository
142 143
             $schedSeatList[$key]['gongxian'] = $pcYanglaojinGongxian['gongxian'];
143 144
             $schedSeatList[$key]['relation_id'] = $relation_id; // 场次ID
144 145
             $schedSeatList[$key]['sched_sign'] = $sched_sign; // 场次编码
146
+
147
+            $seat[$value['rowNo']][] = $schedSeatList[$key];
145 148
         }
149
+        if ($seat) ksort($seat);
146 150
 
147
-        return $schedSeatList;
151
+        return array_values($seat);
148 152
     }
149 153
 
150 154
     /**