|
@@ -27,6 +27,10 @@ class Customar extends BaseController
|
|
|
if ($companyName == "") {
|
|
|
return error_show(1002, "参数companyName不能为空");
|
|
|
}
|
|
|
+ $rename = Db::name('customer_info')->where(['is_del' => 0, 'name' => $companyName])->find();
|
|
|
+ if (!empty($rename)) {
|
|
|
+ return error_show(1002, "公司名称已存在");
|
|
|
+ }
|
|
|
$parent = isset($this->post['parent']) && $this->post['parent'] !== "" ? intval($this->post['parent'] ) : "0";
|
|
|
// if ($parent === "") {
|
|
|
// return error_show(1002, "参数parent不能为空");
|