diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index 6540bf3af..f84d722e2 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -324,6 +324,11 @@ class PartnerController extends ThinkController $this->error('已存在同名未审核的cp,请勿重复添加'); } + $has_check = M("partner","tab_")->where(["partner_name"=>$partner_info['partner']])->field("id")->find(); + if ($has_check) { + $this->error('已存在同名cp,请勿重复添加'); + } + $res =D("PartnerVerify")->add_db($save); if ($res) { //操作日志 diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 8f7eac955..586c60fc6 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -970,6 +970,14 @@ class PromoteCompanyController extends ThinkController $this->error('推广公司已存在'); } } + if(!isset($save['id'])){ + $map['company_id'] = 0; + $res = M("PromoteCompanyVerify","tab_")->where($map)->field("id")->find(); + if($res){ + $this->error('已添加过此推广公司,请联系管理尽快审核'); + } + } + // if(!empty(I("contact_phone")) && !checkPhone(I('contact_phone'))) { // $this->error('联系电话格式不正确'); diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index 24915dbd4..530853b05 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -437,11 +437,23 @@