From 2b2acf833ccf46e2c33b68f38121d0dc3b325e55 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 18 Aug 2020 15:14:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=87=8D=E5=A4=8D=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PartnerController.class.php | 5 +++++ .../PromoteCompanyController.class.php | 8 +++++++ .../Admin/View/PromoteCompany/add.html | 22 ++++++++++++++----- 3 files changed, 30 insertions(+), 5 deletions(-) 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 @@