Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
scm_server
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
473b5942
authored
May 16, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
恢复
parent
b35c33b9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
cmd/queue/sync_customer/main.go
cmd/queue/sync_goods/main.go
cmd/queue/sync_supplier/main.go
cmd/queue/sync_customer/main.go
View file @
473b5942
...
...
@@ -6,6 +6,7 @@ import (
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"github.com/imroc/req"
"scm_server/cmd/queue/sync_status/product"
"scm_server/configs"
"scm_server/internal/common"
"scm_server/internal/logic"
...
...
@@ -75,9 +76,9 @@ func (t *RecvPro) Consumer(dataByte []byte) error {
if
err
=
SyncCustomerData
(
operateType
,
customer
);
err
!=
nil
{
goto
ERR
}
//
if err = product.SyncErpStatus("customer", customer.ErpId); err != nil {
//
goto ERR
//
}
if
err
=
product
.
SyncErpStatus
(
"customer"
,
customer
.
ErpId
);
err
!=
nil
{
goto
ERR
}
return
nil
ERR
:
return
logic
.
DealSyncError
(
dataByte
,
customer
.
ErpId
,
"customer"
,
err
)
...
...
cmd/queue/sync_goods/main.go
View file @
473b5942
...
...
@@ -6,6 +6,7 @@ import (
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"github.com/imroc/req"
"scm_server/cmd/queue/sync_status/product"
"scm_server/configs"
"scm_server/internal/common"
"scm_server/internal/logic"
...
...
@@ -78,9 +79,9 @@ func (t *RecvPro) Consumer(dataByte []byte) error {
if
err
=
SyncGoodsData
(
operateType
,
goods
);
err
!=
nil
{
goto
ERR
}
//
if err = product.SyncErpStatus("material", goods.ErpId); err != nil {
//
goto ERR
//
}
if
err
=
product
.
SyncErpStatus
(
"material"
,
goods
.
ErpId
);
err
!=
nil
{
goto
ERR
}
return
nil
ERR
:
return
logic
.
DealSyncError
(
dataByte
,
goods
.
ErpId
,
"goods"
,
err
)
...
...
cmd/queue/sync_supplier/main.go
View file @
473b5942
...
...
@@ -6,6 +6,7 @@ import (
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"github.com/imroc/req"
"scm_server/cmd/queue/sync_status/product"
"scm_server/configs"
"scm_server/internal/common"
"scm_server/internal/logic"
...
...
@@ -76,9 +77,9 @@ func (t *RecvPro) Consumer(dataByte []byte) error {
if
err
=
SyncSupplierData
(
operateType
,
supplier
);
err
!=
nil
{
goto
ERR
}
//
if err = product.SyncErpStatus("supplier", supplier.ErpId); err != nil {
//
goto ERR
//
}
if
err
=
product
.
SyncErpStatus
(
"supplier"
,
supplier
.
ErpId
);
err
!=
nil
{
goto
ERR
}
return
nil
ERR
:
return
logic
.
DealSyncError
(
dataByte
,
supplier
.
ErpId
,
"supplier"
,
err
)
...
...
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