|
|
@@ -9,6 +9,7 @@ namespace app\common\repositories\movie;
|
|
9
|
9
|
|
|
10
|
10
|
use app\common\model\movie\cinema\CinemaSched;
|
|
11
|
11
|
use app\common\repositories\BaseRepository;
|
|
|
12
|
+use crmeb\services\ApiResponseService;
|
|
12
|
13
|
use think\facade\Db;
|
|
13
|
14
|
|
|
14
|
15
|
/**
|
|
|
@@ -63,7 +64,35 @@ class CinemaSchedRepository extends BaseRepository
|
|
63
|
64
|
* @throws \think\db\exception\DbException
|
|
64
|
65
|
* @throws \think\db\exception\ModelNotFoundException
|
|
65
|
66
|
*/
|
|
66
|
|
- public function getFilmSched($page, $limit, $film_sign, $longitude, $latitude, $show_date, $show_time, $with = [], $order = 1)
|
|
|
67
|
+ public function getFilmSched($page, $limit, $film_sign, $longitude, $latitude, $city_sign)
|
|
|
68
|
+ {
|
|
|
69
|
+ /** @var MovieRepository $movieRepository */
|
|
|
70
|
+ $movieRepository = app()->make(MovieRepository::class);
|
|
|
71
|
+ $result = $movieRepository->getFilmSched($page, $limit, $film_sign, $longitude, $latitude, $city_sign);
|
|
|
72
|
+ $cinema_sched = (isset($result['code']) && ($result['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE))
|
|
|
73
|
+ ? $result['data']['list'] : [];
|
|
|
74
|
+ $count = (isset($result['code']) && ($result['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE))
|
|
|
75
|
+ ? $result['data']['paging']['total'] : 0;
|
|
|
76
|
+ $pages = (isset($result['code']) && ($result['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE))
|
|
|
77
|
+ ? $result['data']['paging']['pages'] : 0;
|
|
|
78
|
+
|
|
|
79
|
+ return compact('cinema_sched', 'count', 'pages');
|
|
|
80
|
+ }
|
|
|
81
|
+
|
|
|
82
|
+ /**
|
|
|
83
|
+ * @param $page
|
|
|
84
|
+ * @param $limit
|
|
|
85
|
+ * @param $longitude
|
|
|
86
|
+ * @param $latitude
|
|
|
87
|
+ * @param $show_date
|
|
|
88
|
+ * @param $with
|
|
|
89
|
+ * @param $order
|
|
|
90
|
+ * @return array
|
|
|
91
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
92
|
+ * @throws \think\db\exception\DbException
|
|
|
93
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
94
|
+ */
|
|
|
95
|
+ public function getFilmSchedBak($page, $limit, $film_sign, $longitude, $latitude, $show_date, $show_time, $with = [], $order = 1)
|
|
67
|
96
|
{
|
|
68
|
97
|
$field = 'sched_sign,cinema_sign,cinema_name,address,show_date,price,longitude,latitude';
|
|
69
|
98
|
$where = ['film_sign' => $film_sign, 'show_date' => $show_date];
|