From 3530456cfaddb8ad8f9fd47d8db3609e2df1da83 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Thu, 11 Jun 2020 15:43:59 +0800 Subject: [PATCH] upt --- Application/Admin/Controller/PromoteCompanyController.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 91efcf099..007454ea5 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -604,6 +604,8 @@ WHERE old_change_promote_id in ({$promoteData})"; } else { if ($id) { if ($delete) { + $useingService = M('promote_company')->where(['service_agreement_show'=>$id])->find(); + if (!empty($useingService)) return $this->error('有正在使用该服务协议的公司,无法删除'); $result = M('service_agreement', 'tab_')->where(['id'=>$id])->delete(); return $result ? $this->success('删除完成') : $this->error('删除失败'); }