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
4746e394
authored
Apr 27, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
引包问题
parent
4f4bc2c7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
2 deletions
cmd/source/customer/customer.go
cmd/source/goods/goods.go
cmd/source/supplier/supplier.go
internal/logic/goods.go
cmd/source/customer/customer.go
View file @
4746e394
...
...
@@ -5,6 +5,7 @@ import (
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"github.com/tealeg/xlsx"
"scm_server/configs"
"scm_server/internal/logic"
"scm_server/internal/model"
)
...
...
cmd/source/goods/goods.go
View file @
4746e394
...
...
@@ -5,6 +5,7 @@ import (
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"github.com/tealeg/xlsx"
"scm_server/configs"
"scm_server/internal/logic"
"scm_server/internal/model"
)
...
...
cmd/source/supplier/supplier.go
View file @
4746e394
...
...
@@ -5,6 +5,7 @@ import (
"fmt"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"github.com/tealeg/xlsx"
"scm_server/configs"
"scm_server/internal/logic"
"scm_server/internal/model"
)
...
...
internal/logic/goods.go
View file @
4746e394
...
...
@@ -18,7 +18,7 @@ const WriteGoodsSyncErrorSql = "UPDATE `lie_goods` SET sync_error = ? WHERE good
const
SyncGoodsSuccessSql
=
"UPDATE `lie_goods` SET sync_status = 1 , sync_time = ? WHERE erp_id = ?"
const
SyncGoodsSuccess
SqlWithStatus
=
"UPDATE `lie_goods` SET sync_status = 1 , sync_time = ? , status = ? WHERE erp_id = ?"
const
SyncGoodsSuccess
WithStatusSql
=
"UPDATE `lie_goods` SET sync_status = 1 , sync_time = ? , status = ? WHERE erp_id = ?"
//检查物料是否存在
func
CheckGoodsExist
(
erpId
string
)
(
exist
bool
)
{
...
...
@@ -61,7 +61,7 @@ func SyncGoodsSuccess(erpId string, isDelete bool) (err error) {
if
!
isDelete
{
_
,
err
=
dao
.
GetDb
()
.
Exec
(
SyncGoodsSuccessSql
,
time
.
Now
()
.
Unix
(),
erpId
)
}
else
{
_
,
err
=
dao
.
GetDb
()
.
Exec
(
SyncGoodsSuccess
SqlWithStatus
,
time
.
Now
()
.
Unix
(),
0
,
erpId
)
_
,
err
=
dao
.
GetDb
()
.
Exec
(
SyncGoodsSuccess
WithStatusSql
,
time
.
Now
()
.
Unix
(),
0
,
erpId
)
}
return
}
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