family 1 vuosi sitten
vanhempi
commit
408905af09

+ 5 - 1
app/command/CinemaSchedCommand.php

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

+ 3 - 0
app/command/MovieCinemaCommand.php

@@ -40,13 +40,16 @@ class MovieCinemaCommand extends Command
40 40
         $cinemaLists = $movieRepository->getCinema($page, $limit);
41 41
 
42 42
         if (isset($cinemaLists['code']) && ($cinemaLists['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
43
+            // 写入影院数据
43 44
             $this->createMovieCinema($cinemaLists['data']['list']);
44 45
 
45 46
             $data = $cinemaLists['data'];
46 47
             $totalPages = $data['paging']['pages'] ?? 0;
47 48
             for ($index = ($page + 1); $index <= $totalPages; $index++) {
49
+                // 请求第三方影院接口获取影院列表
48 50
                 $cinemaLists = $movieRepository->getCinema($index, $limit);
49 51
                 if (isset($cinemaLists['code']) && ($cinemaLists['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
52
+                    // 写入影院数据
50 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 20
     protected function execute(Input $input, Output $output)
21 21
     {
22
+        // 城市列表
22 23
         $this->doMovieCity();
24
+        // 城区列表
23 25
         $this->doMovieCityArea();
24 26
     }
25 27