|
@@ -51,6 +51,9 @@ class BannerRepository
|
|
|
'rule' => json_encode($request['rule']),
|
|
|
];
|
|
|
}else{
|
|
|
+ if (!is_int($request['link_content_id'])){
|
|
|
+ throw new HttpException(500, '链接内容必须是数字');
|
|
|
+ }
|
|
|
$banner = [
|
|
|
'name' => $request['name'],
|
|
|
'link_content_id' => $request['link_content_id'],
|
|
@@ -101,6 +104,9 @@ class BannerRepository
|
|
|
$this->bannerIds($request);
|
|
|
|
|
|
}else{
|
|
|
+ if (!is_int($request['link_content_id'])){
|
|
|
+ throw new HttpException(500, '链接内容必须是数字');
|
|
|
+ }
|
|
|
$banner->name = $request['name'];
|
|
|
$banner->link_content_id = $request['link_content_id'];
|
|
|
$banner->image = $request['image'];
|