Commit e7760d72 by 杨树贤

邮件内容修改

parent 73082306
...@@ -176,17 +176,16 @@ class SyncSupplierService ...@@ -176,17 +176,16 @@ class SyncSupplierService
$groupCode = array_get($syncResult, 'group_code'); $groupCode = array_get($syncResult, 'group_code');
$sourceSn = array_get($syncResult, 'source_sn'); $sourceSn = array_get($syncResult, 'source_sn');
$companyCategory = array_get($syncResult, 'company_category', ''); $companyCategory = array_get($syncResult, 'company_category', '');
$isEntity = $companyCategory == "实体名单供应商";
$supplier = SupplierChannelModel::where('supplier_id', $sourceSn)->orWhere('group_code', $groupCode)->first(); $supplier = SupplierChannelModel::where('supplier_id', $sourceSn)->orWhere('group_code', $groupCode)->first();
$supplier = !empty($supplier) ? $supplier->toArray() : []; $supplier = !empty($supplier) ? $supplier->toArray() : [];
$supplierId = $supplier['supplier_id']; $supplierId = $supplier['supplier_id'];
$supplier = SupplierChannelModel::where('supplier_id', $supplierId)->first()->toArray(); $supplier = SupplierChannelModel::where('supplier_id', $supplierId)->first()->toArray();
if ($companyCategory != '') { if ($companyCategory != '') {
//实体名单和黑名单都要拉黑,如果不属于黑名单,那么就要将状态改成审核中 //实体名单和黑名单都要拉黑,如果不属于黑名单,那么就要将状态改成审核中
if ($companyCategory != '普通供应商') { if ($companyCategory == '黑名单供应商') {
$data['status'] = SupplierChannelModel::STATUS_BLOCK; $data['status'] = SupplierChannelModel::STATUS_BLOCK;
$data['block_reason'] = '一体化系统黑名单供应商'; $data['block_reason'] = '一体化系统黑名单供应商';
} elseif ($isEntity) { }else if ($companyCategory == '实体名单供应商') {
$status = $supplier['status']; $status = $supplier['status'];
//加入实体化之前,要先记录原来的状态 //加入实体化之前,要先记录原来的状态
if (!$redis->hget('supplier_status_before_disable', $supplierId)) { if (!$redis->hget('supplier_status_before_disable', $supplierId)) {
...@@ -194,6 +193,7 @@ class SyncSupplierService ...@@ -194,6 +193,7 @@ class SyncSupplierService
} }
$data['status'] = SupplierChannelModel::STATUS_DISABLE; $data['status'] = SupplierChannelModel::STATUS_DISABLE;
$data['is_entity'] = SupplierChannelModel::IS_ENTITY_TRUE; $data['is_entity'] = SupplierChannelModel::IS_ENTITY_TRUE;
$data['block_reason'] = '';
$data['disable_reason'] = '一体化系统实体名单供应商'; $data['disable_reason'] = '一体化系统实体名单供应商';
} else { } else {
$preIsEntity = $supplier['is_entity']; $preIsEntity = $supplier['is_entity'];
...@@ -311,6 +311,8 @@ class SyncSupplierService ...@@ -311,6 +311,8 @@ class SyncSupplierService
$data['data']['supplier_name'] = $supplier['supplier_name']; $data['data']['supplier_name'] = $supplier['supplier_name'];
$data['data']['supplier_group_name'] = array_get(config('fixed.SupplierGroup'), $supplier['supplier_group']); $data['data']['supplier_group_name'] = array_get(config('fixed.SupplierGroup'), $supplier['supplier_group']);
$data['data']['operation'] = $isEntity ? '确认' : '移除'; $data['data']['operation'] = $isEntity ? '确认' : '移除';
$data['data']['content'] = $isEntity ? ' 注意:实体名单的供应商已自动拉入禁止交易,无法使用!' : '注意:已移除实体名单的供应商,状态自动返回到前一个状态!';
$data['data']['ps_content'] = $isEntity ? 'PS:如果该供应商为芯链商家,该供应商的芯链账号无法登录芯链系统!' : 'PS:如果该供应商为芯链商家,该供应商的芯链账号可正常登录芯链系统!';
if ($isYunxinSupplier) { if ($isYunxinSupplier) {
$data['data']['supplier_name'] .= ' (芯链商家) '; $data['data']['supplier_name'] .= ' (芯链商家) ';
} }
......
...@@ -82,5 +82,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function () ...@@ -82,5 +82,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
}); });
Route::match(['get', 'post'], '/test', function () { Route::match(['get', 'post'], '/test', function () {
(new \App\Http\Services\SyncSupplierService())->receiveEntityResult('沛县懒洋洋服装店', -1); (new \App\Http\Services\SyncSupplierService())->receiveEntityResult('沛县懒洋洋服装店', 1);
}); });
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