|
@@ -27,6 +27,10 @@ class Keepbrand extends BaseController
|
|
if($brand_id==""){
|
|
if($brand_id==""){
|
|
return error_show(1003,"参数brand_id不能为空");
|
|
return error_show(1003,"参数brand_id不能为空");
|
|
}
|
|
}
|
|
|
|
+ $rename = Db::name('brand_book')->where(['brand_id' => $brand_id,'is_del' => 0])->find();
|
|
|
|
+ if (!empty($rename)) {
|
|
|
|
+ return error_show(1002, "品牌名称已存在");
|
|
|
|
+ }
|
|
// $is_book = isset($this->post['is_book']) && $this->post['is_book'] !=="" ? trim($this->post['is_book']):"";
|
|
// $is_book = isset($this->post['is_book']) && $this->post['is_book'] !=="" ? trim($this->post['is_book']):"";
|
|
// if($is_book==""){
|
|
// if($is_book==""){
|
|
// return error_show(1003,"参数is_book不能为空");
|
|
// return error_show(1003,"参数is_book不能为空");
|
|
@@ -181,6 +185,10 @@ class Keepbrand extends BaseController
|
|
if($brand_id==""){
|
|
if($brand_id==""){
|
|
return error_show(1002,"参数brand_id不能为空");
|
|
return error_show(1002,"参数brand_id不能为空");
|
|
}
|
|
}
|
|
|
|
+ $rename = Db::name('brand_book')->where(['brand_id' => $brand_id, 'is_del' => 0])->find();
|
|
|
|
+ if (!empty($rename)) {
|
|
|
|
+ return error_show(1002, "品牌名称已存在");
|
|
|
|
+ }
|
|
// $is_book = isset($this->post['is_book']) && $this->post['is_book'] !== "" ? intval($this->post['is_book']):"";
|
|
// $is_book = isset($this->post['is_book']) && $this->post['is_book'] !== "" ? intval($this->post['is_book']):"";
|
|
// if($is_book==""){
|
|
// if($is_book==""){
|
|
// return error_show(1002,"参数is_book不能为空");
|
|
// return error_show(1002,"参数is_book不能为空");
|