Commit ba86941a by 杨树贤

账号判断问题

parent 07f7612e
......@@ -43,6 +43,7 @@ class SupplierAccountValidator
//return '该供应商没有绑定SKU采购,请完善相关信息';
}
$supplierCount = $model->where('supplier_code', $account['supplier_code'])
->where('parent_id',0)
->count();
if ($supplierCount > 0) {
return '该供应商已经存在账号';
......@@ -55,6 +56,7 @@ class SupplierAccountValidator
} else {
$supplierCount = $model->where('id', '!=', $account['id'])
->where('supplier_code', $account['supplier_code'])
->where('parent_id',0)
->count();
if ($supplierCount > 0) {
return '该供应商已经存在账号';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment