|
@@ -27,6 +27,10 @@ class Keepbrand extends BaseController
|
|
|
if($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']):"";
|
|
|
// if($is_book==""){
|
|
|
// return error_show(1003,"参数is_book不能为空");
|
|
@@ -43,7 +47,7 @@ class Keepbrand extends BaseController
|
|
|
$creater= isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
|
|
|
$long = isset($this->post['long']) && $this->post['long'] !=="" ? intval($this->post['long']):"0";
|
|
|
|
|
|
- $status = isset($this->post['status']) && $this->post['status'] !=="" ? intval($this->post['status']) :"1";
|
|
|
+ $status = isset($this->post['status']) && $this->post['status'] !=="" ? intval($this->post['status']) :"0";
|
|
|
$data=[
|
|
|
"brand_book"=>$brand_book,
|
|
|
"gyscode"=>$gyscode,
|
|
@@ -181,6 +185,10 @@ class Keepbrand extends BaseController
|
|
|
if($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']):"";
|
|
|
// if($is_book==""){
|
|
|
// return error_show(1002,"参数is_book不能为空");
|