Commit 5ac33614 by 杨树贤

监听实体状态是否变化,有变化才发邮件

parent 0ce675d9
Showing with 11 additions and 1 deletions
......@@ -274,7 +274,7 @@ class SyncSupplierService
$logContent = $reason = "待确认实体名单,系统自动拉入禁止交易,请联系“风控部门”进行确认. 风险类型 : $warningType 风险词 : $warningKeyword 风险数据 : $warningData";
}
if ($result == -3) {
$handleReason = array_get($resultData, 'handle_result','无');
$handleReason = array_get($resultData, 'handle_result', '无');
$isEntityResult = SupplierChannelModel::IS_ENTITY_REJECT;
$logContent = $reason = "被驳回供应商,系统自动拉入禁止交易,处理说明 : $handleReason . 风险类型 : $warningType 风险词 : $warningKeyword 风险数据 : $warningData";
}
......@@ -288,7 +288,9 @@ class SyncSupplierService
Log::error('供应商不存在');
return true;
}
foreach ($suppliers as $supplier) {
$originIsEntity = $supplier['is_entity'];
//$supplier = $supplier->toArray();
$supplierId = $supplier['supplier_id'];
//先把修改之前的状态给记录下来
......@@ -352,10 +354,18 @@ class SyncSupplierService
return true;
}
//判断是否有实体化状态变化,没有的话就跳过
if ($originIsEntity == $isEntityResult) {
continue;
}
//本地
if (isDevEnvironment()) {
continue;
}
//return true;
//还要去发送邮箱给采购员,线上采购员,采购总
$data['data']['supplier_code'] = $supplier['supplier_code'];
......
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