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
11696ef8
authored
Jun 28, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
回调
parent
62204f8f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
app/Http/Services/SyncSupplierService.php
app/Http/routes.php
app/Http/Services/SyncSupplierService.php
View file @
11696ef8
...
...
@@ -152,11 +152,21 @@ class SyncSupplierService
$groupCode
=
array_get
(
$syncResult
,
'group_code'
);
$sourceSn
=
array_get
(
$syncResult
,
'source_sn'
);
$supplierId
=
$sourceSn
;
if
(
$supplierId
)
{
return
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'sync_united_status'
=>
SupplierChannelModel
::
SYNC_UNITED_STATUS_OK
,
'group_code'
=>
$groupCode
,
'company_nature'
=>
$syncResult
[
'company_nature'
],
]);
}
else
{
return
SupplierChannelModel
::
where
(
'group_code'
,
$groupCode
)
->
update
([
'sync_united_status'
=>
SupplierChannelModel
::
SYNC_UNITED_STATUS_OK
,
'group_code'
=>
$groupCode
,
'company_nature'
=>
$syncResult
[
'company_nature'
],
]);
}
}
}
\ No newline at end of file
app/Http/routes.php
View file @
11696ef8
...
...
@@ -60,5 +60,6 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
(
new
\App\Http\Services\SyncSupplierService
())
->
syncSupplierToUnited
(
12421
);
$resut
=
json_decode
(
'{"group_code":"G000010","source_sn":0,"company_name":"深圳大事件科技有限公司","init_nature":"原厂","company_nature":"方案商","company_type":2}'
,
true
);
dd
((
new
\App\Http\Services\SyncSupplierService
())
->
syncSupplierToUnitedResult
(
$resut
));
});
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