Commit 2c15f782 by 杨树贤

黑名单优化

parent f2e8a1ff
...@@ -297,6 +297,9 @@ class SupplierApiController extends Controller ...@@ -297,6 +297,9 @@ class SupplierApiController extends Controller
{ {
$supplierName = trim($request->get('supplier_name')); $supplierName = trim($request->get('supplier_name'));
$taxNumber = $request->get('tax_number'); $taxNumber = $request->get('tax_number');
if (empty($supplierName) && empty($taxNumber)) {
$this->response(0, 'ok');
}
$supplierId = $request->get('supplier_id'); $supplierId = $request->get('supplier_id');
$region = $request->get('region'); $region = $request->get('region');
$model = new SupplierChannelModel(); $model = new SupplierChannelModel();
......
...@@ -27,6 +27,7 @@ class SupplierValidator ...@@ -27,6 +27,7 @@ class SupplierValidator
$isAdd = empty($validateData['supplier_id']) ? true : false; $isAdd = empty($validateData['supplier_id']) ? true : false;
if ($validateData['supplier_name']) {
//新增的时候要先去检验下一体化的数据,如果是实体黑名单用户,那么就不允许新增 //新增的时候要先去检验下一体化的数据,如果是实体黑名单用户,那么就不允许新增
$regionType = $validateData['region'] == SupplierChannelModel::REGION_CN ? 1 : 2; $regionType = $validateData['region'] == SupplierChannelModel::REGION_CN ? 1 : 2;
//还要校验提交上来的公司是否有合法信息 //还要校验提交上来的公司是否有合法信息
...@@ -45,6 +46,7 @@ class SupplierValidator ...@@ -45,6 +46,7 @@ class SupplierValidator
} }
} }
} }
}
//没有忽略校验的权限并且供应商地区属于内地和港台才会去校验天眼查 //没有忽略校验的权限并且供应商地区属于内地和港台才会去校验天眼查
if (!checkPerm('IgnoreCompanyCheck') && in_array($validateData['region'], if (!checkPerm('IgnoreCompanyCheck') && in_array($validateData['region'],
......
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