Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b9faacac
authored
Jun 25, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
1de43152
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
.gitignore
app/Http/Controllers/Api/SupplierApiController.php
app/Http/Services/SupplierService.php
app/Http/Services/SupplierTagService.php
.gitignore
View file @
b9faacac
...
...
@@ -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
app/Http/Controllers/Api/SupplierApiController.php
View file @
b9faacac
...
...
@@ -124,7 +124,6 @@ class SupplierApiController extends Controller
$this
->
response
(
-
1
,
$validateResult
);
}
$channelMap
=
$this
->
channelMap
;
$channelMap
=
array_merge
(
$channelMap
,
[
'supplier_consignee'
,
...
...
app/Http/Services/SupplierService.php
View file @
b9faacac
...
...
@@ -348,7 +348,6 @@ class SupplierService
$logAction
=
'新增供应商'
;
$logContent
=
'确认新增供应商'
;
}
//一体化新流程,如果是新建,新建完了以后还要去请求一次验证实体名单的接口,因为只有新建完才有具体的地址source_id这些东西,为什么不放到数据库事务里面,因为校验完
//但是供应商还没有插入db的时候,可能会提前广播到,导致没法操作供应商的状态(因为供应商都还没有生成)
if
(
empty
(
$channel
[
'supplier_id'
]))
{
...
...
app/Http/Services/SupplierTagService.php
View file @
b9faacac
...
...
@@ -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
());
}
}
//批量新增标签
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment