|
|
@@ -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
|