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
5bde83ae
authored
Jun 30, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改同步逻辑
parent
3532dcbc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
app/Http/Services/SyncSupplierService.php
app/Http/Services/SyncSupplierService.php
View file @
5bde83ae
...
...
@@ -4,6 +4,7 @@
namespace
App\Http\Services
;
//后台用户相关信息服务
use
App\Model\RedisModel
;
use
App\Model\SupplierAttachmentsModel
;
use
App\Model\SupplierChannelModel
;
use
App\Model\SupplierContactModel
;
...
...
@@ -153,6 +154,10 @@ class SyncSupplierService
$sourceSn
=
array_get
(
$syncResult
,
'source_sn'
);
$supplierId
=
$sourceSn
;
if
(
$supplierId
)
{
$supplier
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
first
();
$supplier
=
!
empty
(
$supplier
)
?
$supplier
->
toArray
()
:
[];
$redis
=
new
RedisModel
();
$redis
->
hset
(
'supplier_sync_backup'
,
$supplierId
,
json_encode
(
$supplier
));
return
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'supplier_name'
=>
$syncResult
[
'company_name'
],
...
...
@@ -160,7 +165,7 @@ class SyncSupplierService
'group_code'
=>
$groupCode
,
'company_nature'
=>
$syncResult
[
'company_nature'
],
]);
}
else
{
}
else
{
return
SupplierChannelModel
::
where
(
'group_code'
,
$groupCode
)
->
update
([
'sync_united_status'
=>
SupplierChannelModel
::
SYNC_UNITED_STATUS_OK
,
...
...
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