family 1 год назад
Родитель
Сommit
408905af09

+ 5 - 1
app/command/CinemaSchedCommand.php

@@ -29,10 +29,12 @@ class CinemaSchedCommand extends Command
29
         try {
29
         try {
30
             /** @var CinemaRepository $cinema */
30
             /** @var CinemaRepository $cinema */
31
             $cinema = app()->make(CinemaRepository::class);
31
             $cinema = app()->make(CinemaRepository::class);
32
+            // 获取影院列表
32
             $result = $cinema->getLocalCinema($this->page, $this->limit, '', '', [], [], 0);
33
             $result = $cinema->getLocalCinema($this->page, $this->limit, '', '', [], [], 0);
33
 
34
 
34
             /** @var FilmRepository $filmRepository */
35
             /** @var FilmRepository $filmRepository */
35
             $filmRepository = app()->make(FilmRepository::class);
36
             $filmRepository = app()->make(FilmRepository::class);
37
+            // 获取已上映影片列表
36
             $filmResult = $filmRepository->getFilm($this->page, $this->limit);
38
             $filmResult = $filmRepository->getFilm($this->page, $this->limit);
37
 
39
 
38
             foreach ($filmResult['film_list'] as $key => $film) {
40
             foreach ($filmResult['film_list'] as $key => $film) {
@@ -56,13 +58,15 @@ class CinemaSchedCommand extends Command
56
     {
58
     {
57
         /** @var MovieRepository $cinema_filmRepository */
59
         /** @var MovieRepository $cinema_filmRepository */
58
         $cinema_filmRepository = app()->make(MovieRepository::class);
60
         $cinema_filmRepository = app()->make(MovieRepository::class);
61
+        // 获取排片场次
59
         $cinema_sched = $cinema_filmRepository->getCinemaSched($film['film_sign'], $cinema['cinema_sign']);
62
         $cinema_sched = $cinema_filmRepository->getCinemaSched($film['film_sign'], $cinema['cinema_sign']);
60
 
63
 
64
+        // 写入排片场次数据
61
         $this->createCinemaSched($cinema_sched, $cinema);
65
         $this->createCinemaSched($cinema_sched, $cinema);
62
     }
66
     }
63
 
67
 
64
     /**
68
     /**
65
-     * 设置影院场次
69
+     * 写入排片场次数据
66
      *
70
      *
67
      * @param $list
71
      * @param $list
68
      * @param $cinema
72
      * @param $cinema

+ 3 - 0
app/command/MovieCinemaCommand.php

@@ -40,13 +40,16 @@ class MovieCinemaCommand extends Command
40
         $cinemaLists = $movieRepository->getCinema($page, $limit);
40
         $cinemaLists = $movieRepository->getCinema($page, $limit);
41
 
41
 
42
         if (isset($cinemaLists['code']) && ($cinemaLists['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
42
         if (isset($cinemaLists['code']) && ($cinemaLists['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
43
+            // 写入影院数据
43
             $this->createMovieCinema($cinemaLists['data']['list']);
44
             $this->createMovieCinema($cinemaLists['data']['list']);
44
 
45
 
45
             $data = $cinemaLists['data'];
46
             $data = $cinemaLists['data'];
46
             $totalPages = $data['paging']['pages'] ?? 0;
47
             $totalPages = $data['paging']['pages'] ?? 0;
47
             for ($index = ($page + 1); $index <= $totalPages; $index++) {
48
             for ($index = ($page + 1); $index <= $totalPages; $index++) {
49
+                // 请求第三方影院接口获取影院列表
48
                 $cinemaLists = $movieRepository->getCinema($index, $limit);
50
                 $cinemaLists = $movieRepository->getCinema($index, $limit);
49
                 if (isset($cinemaLists['code']) && ($cinemaLists['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
51
                 if (isset($cinemaLists['code']) && ($cinemaLists['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
52
+                    // 写入影院数据
50
                     $this->createMovieCinema($cinemaLists['data']['list']);
53
                     $this->createMovieCinema($cinemaLists['data']['list']);
51
                 }
54
                 }
52
             }
55
             }

+ 2 - 0
app/command/MovieCityAreaCommand.php

@@ -19,7 +19,9 @@ class MovieCityAreaCommand extends Command
19
 
19
 
20
     protected function execute(Input $input, Output $output)
20
     protected function execute(Input $input, Output $output)
21
     {
21
     {
22
+        // 城市列表
22
         $this->doMovieCity();
23
         $this->doMovieCity();
24
+        // 城区列表
23
         $this->doMovieCityArea();
25
         $this->doMovieCityArea();
24
     }
26
     }
25
 
27