edit-api-edit-customer

This commit is contained in:
lccsw
2022-01-06 10:53:38 +08:00
parent 1feaf60ac9
commit 59ba2e4c37
+9 -7
View File
@@ -120,14 +120,16 @@ class Customers extends Wxapp
}
$car_json = json_decode($row['car_json'], true);
$update = [];
if ($mobile) {
if (!mobile_valid($mobile)) {
throw new Exception('手机号格式错误', ERR_PARAMS_ERROR);
if($row['cf_title']!='平台分配'){
if ($mobile) {
if (!mobile_valid($mobile)) {
throw new Exception('手机号格式错误', ERR_PARAMS_ERROR);
}
if ($this->customers_model->count(['biz_id' => $biz_id, 'mobile' => $mobile])) {
throw new Exception('客户已存在', API_CODE_FAIL);
}
$update['mobile'] = $mobile;
}
if ($this->customers_model->count(['biz_id' => $biz_id, 'mobile' => $mobile])) {
throw new Exception('客户已存在', API_CODE_FAIL);
}
$update['mobile'] = $mobile;
}
$s_row = $this->auto_series_model->get(['id' => $car_id]);
$ids_arr = [];