diff --git a/app/api/controller/Wholesaler.php b/app/api/controller/Wholesaler.php index 30fa5fab..d62c0062 100644 --- a/app/api/controller/Wholesaler.php +++ b/app/api/controller/Wholesaler.php @@ -238,6 +238,10 @@ class Wholesaler extends Controller if ($exists_id && $info->id != $exists_id) { return $this->renderError('该身份证号已存在'); } + $exists_id = $model->where(['credit_code' => $credit_code])->value('id'); + if ($exists_id && $info->id != $exists_id) { + return $this->renderError('营业执照已存在'); + } try { CaptchaApi::checkSms($mobile_code, $mobile); } catch (Exception $e) {