Commit b9faacac by 杨树贤

fix

parent 1de43152
......@@ -7,4 +7,5 @@ Homestead.json
/.history
/vendor/_laravel_idea/*
/vendor/_laravel_idea
/vendor/_laravel_ide
/storage/framework/views
\ No newline at end of file
......@@ -124,7 +124,6 @@ class SupplierApiController extends Controller
$this->response(-1, $validateResult);
}
$channelMap = $this->channelMap;
$channelMap = array_merge($channelMap, [
'supplier_consignee',
......
......@@ -348,7 +348,6 @@ class SupplierService
$logAction = '新增供应商';
$logContent = '确认新增供应商';
}
//一体化新流程,如果是新建,新建完了以后还要去请求一次验证实体名单的接口,因为只有新建完才有具体的地址source_id这些东西,为什么不放到数据库事务里面,因为校验完
//但是供应商还没有插入db的时候,可能会提前广播到,导致没法操作供应商的状态(因为供应商都还没有生成)
if (empty($channel['supplier_id'])) {
......
......@@ -128,15 +128,20 @@ class SupplierTagService
if (empty($params)) {
return true;
}
$response = $this->client->post('/update', [
RequestOptions::JSON => $params,
]);
$data = json_decode($response->getBody()->getContents(), true);
if (!empty($data['status']) && $data['status'] == 1) {
return true;
} else {
Log::error('保存标签失败,' . json_encode($data));
try {
$response = $this->client->post('/update', [
RequestOptions::JSON => $params,
]);
$data = json_decode($response->getBody()->getContents(), true);
if (!empty($data['status']) && $data['status'] == 1) {
return true;
} else {
Log::error('保存标签失败,' . json_encode($data));
}
} catch (\Exception $e) {
Log::error('保存标签失败,' . $e->getMessage());
}
}
//批量新增标签
......
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