|
@@ -5,6 +5,7 @@ namespace app\admin\controller\life;
|
|
|
use app\admin\validate\life\CinemaValidate;
|
|
|
use app\controller\Curd;
|
|
|
use app\model\Cinema as CinemaModel;
|
|
|
+use app\model\CinemaIlk;
|
|
|
use app\model\CinemaPerformers;
|
|
|
use support\exception\BusinessException;
|
|
|
use support\Request;
|
|
@@ -54,10 +55,10 @@ class CinemaController extends Curd
|
|
|
$item->cinema_video = !empty($item->cinema_video) ? getenv('STORAGE_DOMAIN') . $item->cinema_video : '';
|
|
|
$item->cinema_time = !empty($item->cinema_time) ? date('Y-m-d H:i:s', strtotime($item->cinema_time)) : '';
|
|
|
$item->cinema_label = !empty($item->cinema_label) ? explode(',', $item->cinema_label) : [];
|
|
|
- $item->cinema_mold = !empty($item->cinema_mold) ? explode(',', $item->cinema_mold) : [];
|
|
|
$item->cinema_director = !empty($item->cinema_director) ? array_map('intval', explode(',', $item->cinema_director)) : '';
|
|
|
$item->cinema_star = !empty($item->cinema_star) ? array_map('intval', explode(',', $item->cinema_star)) : '';
|
|
|
$item->cinema_performers = !empty($item->cinema_performers) ? array_map('intval', explode(',', $item->cinema_performers)) : '';
|
|
|
+ $item->cinema_mold = !empty($item->cinema_mold) ? array_map('intval', explode(',', $item->cinema_mold)) : '';
|
|
|
if (!empty($item->cinema_director)) {
|
|
|
$cinemaDirector = CinemaPerformers::whereIn('performers_id', $item->cinema_director)->pluck('performers_name');
|
|
|
if ($cinemaDirector) {
|
|
@@ -74,11 +75,18 @@ class CinemaController extends Curd
|
|
|
}
|
|
|
if (!empty($item->cinema_performers)) {
|
|
|
$cinemaPerformers = CinemaPerformers::whereIn('performers_id', $item->cinema_performers)->pluck('performers_name');
|
|
|
- if ($cinemaPerformers){
|
|
|
+ if ($cinemaPerformers) {
|
|
|
$cinemaPerformers = $cinemaPerformers->toArray();
|
|
|
$item->cinemaPerformers = implode(',', $cinemaPerformers);
|
|
|
}
|
|
|
}
|
|
|
+ if (!empty($item->cinema_mold)) {
|
|
|
+ $cinemaIlk = CinemaIlk::whereIn('ilk_id', $item->cinema_mold)->pluck('ilk_name');
|
|
|
+ if ($cinemaIlk) {
|
|
|
+ $cinemaIlk = $cinemaIlk->toArray();
|
|
|
+ $item->cinemaIlk = implode(',', $cinemaIlk);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return $items;
|