|
|
@@ -40,7 +40,7 @@ class FilmRepository extends BaseRepository
|
|
40
|
40
|
* @throws \think\db\exception\DbException
|
|
41
|
41
|
* @throws \think\db\exception\ModelNotFoundException
|
|
42
|
42
|
*/
|
|
43
|
|
- public function getFilm($page, $limit, $type = 0, $with = [])
|
|
|
43
|
+ public function getFilm($page, $limit, $type = 0, $film_name = '', $with = [])
|
|
44
|
44
|
{
|
|
45
|
45
|
$field = 'film_sign,film_name,publish_date,language,type,duration,version,cover_img,grade,hots,director,actors';
|
|
46
|
46
|
|
|
|
@@ -50,6 +50,7 @@ class FilmRepository extends BaseRepository
|
|
50
|
50
|
} else {
|
|
51
|
51
|
$where = [['publish_date', '>', $time]];
|
|
52
|
52
|
}
|
|
|
53
|
+ if ($film_name) $where[] = ['film_name', 'like', '%' . $film_name . '%'];
|
|
53
|
54
|
|
|
54
|
55
|
$film_list = $this->dao->where($where)->when($with, function ($query) use ($with) {
|
|
55
|
56
|
$query->with($with);
|