Commit 0ab3c7fd by 杨树贤

优化重复新增

parent 55141612
...@@ -146,6 +146,9 @@ class SupplierApiController extends Controller ...@@ -146,6 +146,9 @@ class SupplierApiController extends Controller
if (checkPerm('IgnoreCompanyCheck')) { if (checkPerm('IgnoreCompanyCheck')) {
$channel['is_standard_add'] = -1; $channel['is_standard_add'] = -1;
} }
if (SupplierChannelModel::where('supplier_name', trim($channel['supplier_name']))->exists()) {
$this->response(0, '操作成功');
}
$service = new SupplierService(); $service = new SupplierService();
$supplierId = $service->saveSupplier($channel); $supplierId = $service->saveSupplier($channel);
if (!$supplierId) { if (!$supplierId) {
......
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