Commit bc120047 by 杨树贤

fix

parent caf0f166
...@@ -34,10 +34,12 @@ class SupplierAccountService ...@@ -34,10 +34,12 @@ class SupplierAccountService
{ {
return true; return true;
//还要去推送给搜索做品牌初始化任务 //还要去推送给搜索做品牌初始化任务
$conn = new AMQPStreamConnection(config('database.connections.rabbitmq.host'), $conn = new AMQPStreamConnection(
config('database.connections.rabbitmq.host'),
config('database.connections.rabbitmq.port'), config('database.connections.rabbitmq.port'),
config('database.connections.rabbitmq.login'), config('database.connections.rabbitmq.login'),
config('database.connections.rabbitmq.password')); config('database.connections.rabbitmq.password')
);
$channel = $conn->channel(); $channel = $conn->channel();
$channel->queue_declare('yunxin_supplier_add', false, true, false, false); $channel->queue_declare('yunxin_supplier_add', false, true, false, false);
$time = strtotime("2021-01-01 00:00:00"); $time = strtotime("2021-01-01 00:00:00");
...@@ -45,8 +47,10 @@ class SupplierAccountService ...@@ -45,8 +47,10 @@ class SupplierAccountService
'canal' => $supplierCode, 'canal' => $supplierCode,
'update_time' => $time 'update_time' => $time
]); ]);
$msg = new AMQPMessage($body, $msg = new AMQPMessage(
['content_type' => 'text/plain', 'delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT]); $body,
['content_type' => 'text/plain', 'delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT]
);
$result = $channel->basic_publish($msg, '', 'yunxin_supplier_add'); $result = $channel->basic_publish($msg, '', 'yunxin_supplier_add');
$channel->close(); $channel->close();
$conn->close(); $conn->close();
...@@ -82,7 +86,7 @@ class SupplierAccountService ...@@ -82,7 +86,7 @@ class SupplierAccountService
if (strpos($supplier->stockup_type, (string)SupplierChannelModel::SUPPLIER_STOCKUP_TYPE_XINLIAN) === false) { if (strpos($supplier->stockup_type, (string)SupplierChannelModel::SUPPLIER_STOCKUP_TYPE_XINLIAN) === false) {
return; return;
} }
$supplierContact = SupplierContactModel::where('supplier_id', $supplierId)->first()->toArray();
//新建账号 //新建账号
SupplierAccountModel::insert([ SupplierAccountModel::insert([
'supplier_id' => $supplierId, 'supplier_id' => $supplierId,
...@@ -92,6 +96,9 @@ class SupplierAccountService ...@@ -92,6 +96,9 @@ class SupplierAccountService
'password_raw' => '123456', 'password_raw' => '123456',
'password' => Hash::make('123456'), 'password' => Hash::make('123456'),
'create_time' => time(), 'create_time' => time(),
'mobile' => array_get($supplierContact, 'supplier_mobile',''),
'email' => array_get($supplierContact, 'supplier_email',''),
'contacts_name' => array_get($supplierContact, 'supplier_consignee',''),
]); ]);
return true; return true;
} }
......
...@@ -186,7 +186,7 @@ class SupplierAuditService ...@@ -186,7 +186,7 @@ class SupplierAuditService
// 先获取审核流节点数据 // 先获取审核流节点数据
$flowInfo = AuditCenterService::getAuditFlowInfo( $flowInfo = AuditCenterService::getAuditFlowInfo(
AuditCenterService::TYPE_SUPPLIER_AUDIT, AuditCenterService::TYPE_SUPPLIER_AUDIT,
request()->user->userId, request()->user->userId == 1000 ? 1629 : request()->user->userId,
null // 供应商没有公司ID概念,传null null // 供应商没有公司ID概念,传null
); );
......
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