Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wang
/
go_upload_sync
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
a3df6f08
authored
Aug 05, 2021
by
hcy001
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
更新上传
parent
6f79295a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
app/dao/sku_upload_log.go
app/service/upload_sku_sync.go
app/dao/sku_upload_log.go
View file @
a3df6f08
...
...
@@ -63,6 +63,7 @@ func UpdatesUploadLogSucess(upSn string,status int64) (error) {
return
nil
}
//csv 上传详情
func
GetUploadLogInfo
(
upSn
string
)
(
*
UpdatesUploadStruct
,
error
)
{
updatesUploadStruct
:=&
UpdatesUploadStruct
{}
_
,
err
:=
Dao
.
GetDb
(
"spu"
)
.
Table
(
"lie_sku_upload_log"
)
.
Where
(
"up_sn=?"
,
upSn
)
.
Get
(
updatesUploadStruct
)
...
...
app/service/upload_sku_sync.go
View file @
a3df6f08
...
...
@@ -67,7 +67,7 @@ func (this *UploadSkuSync)Sync() error{
/*Str:=`
{
"errcode": 10086,
"errcode": 10086,
的已接收数量为
"errmsg": "这是错误信息",
"goods_id": 1161916576790978473,
"add_sku": 0,
...
...
@@ -78,6 +78,8 @@ func (this *UploadSkuSync)Sync() error{
}
`
this.SkuReStr=Str*/
fmt
.
Println
(
this
.
SkuReStr
)
//打印初始数据
r
:=
gjson
.
Parse
(
this
.
SkuReStr
)
if
(
r
.
Exists
()
&&
r
.
IsObject
()){
this
.
SkuRes
=
parseRes
(
r
)
...
...
@@ -92,7 +94,7 @@ func (this *UploadSkuSync)Sync() error{
//开始处理
func
(
this
*
UploadSkuSync
)
handle
()
{
dao
.
IncrSyncQueue
(
this
.
SkuRes
.
UpSn
)
//redis 完成同步+1
dao
.
IncrSyncQueue
(
this
.
SkuRes
.
UpSn
)
//redis 完成同步+1
; csv 接收总条数: should_send_upload
if
(
this
.
SkuRes
.
UpSn
==
""
||
this
.
SkuRes
.
UploadLogId
==
0
){
msg
:=
fmt
.
Sprintf
(
"回调的消息UploadLogId 和 UpSn 为空或者为0%s"
,
this
.
SkuReStr
)
this
.
dingdingSucessPush
(
msg
);
...
...
@@ -220,7 +222,7 @@ func (this *UploadSkuSync) PushStatus3HandleList(uploadInfo *dao.UpdatesUploadSt
}
listMsg
:=
string
(
bytes
)
fmt
.
Printf
(
"单号:%s, 已完成;发送 supplier_sku_callback 队列
\n
,data:%s"
,
uploadInfo
.
UpSn
,
listMsg
)
listName
:=
"supplier_sku_callback"
listName
:=
"supplier_sku_callback"
// A 现有一批100个,这次传10个,剩90全局下架
this
.
rabbitmqPush
(
listName
,
listMsg
)
}
...
...
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