|
|
@ -113,11 +113,6 @@ class AgentController extends AdminController |
|
|
return $form->response()->error($form->username . ' 的账号已经存在'); |
|
|
return $form->response()->error($form->username . ' 的账号已经存在'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//判断公司名称是否唯一
|
|
|
|
|
|
if ($form->repository()->model()->where(['company_name' => $form->company_name, 'credit_codes' => $form->credit_codes])->exists()) { |
|
|
|
|
|
return $form->response()->error("公司名称 {$form->company_name} 已经存在"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//如果是供应商版旅行社,也不能存在相同的供应商账号,因为后台审核之后需要再次插入相同的供应商账号
|
|
|
//如果是供应商版旅行社,也不能存在相同的供应商账号,因为后台审核之后需要再次插入相同的供应商账号
|
|
|
if ($form->type == AgentType::SUPPLIER && Supplier::where('username', $form->username)->exists()) { |
|
|
if ($form->type == AgentType::SUPPLIER && Supplier::where('username', $form->username)->exists()) { |
|
|
return $form->response()->error($form->username . ' 的账号已经存在'); |
|
|
return $form->response()->error($form->username . ' 的账号已经存在'); |
|
|
|