Commit a3df6f08 by hcy001

更新上传

parent 6f79295a
...@@ -63,6 +63,7 @@ func UpdatesUploadLogSucess(upSn string,status int64) (error) { ...@@ -63,6 +63,7 @@ func UpdatesUploadLogSucess(upSn string,status int64) (error) {
return nil return nil
} }
//csv 上传详情
func GetUploadLogInfo(upSn string) (*UpdatesUploadStruct,error) { func GetUploadLogInfo(upSn string) (*UpdatesUploadStruct,error) {
updatesUploadStruct:=&UpdatesUploadStruct{} updatesUploadStruct:=&UpdatesUploadStruct{}
_,err:=Dao.GetDb("spu").Table("lie_sku_upload_log").Where("up_sn=?",upSn).Get(updatesUploadStruct) _,err:=Dao.GetDb("spu").Table("lie_sku_upload_log").Where("up_sn=?",upSn).Get(updatesUploadStruct)
......
...@@ -67,7 +67,7 @@ func (this *UploadSkuSync)Sync() error{ ...@@ -67,7 +67,7 @@ func (this *UploadSkuSync)Sync() error{
/*Str:=` /*Str:=`
{ {
"errcode": 10086, "errcode": 10086,的已接收数量为
"errmsg": "这是错误信息", "errmsg": "这是错误信息",
"goods_id": 1161916576790978473, "goods_id": 1161916576790978473,
"add_sku": 0, "add_sku": 0,
...@@ -78,6 +78,8 @@ func (this *UploadSkuSync)Sync() error{ ...@@ -78,6 +78,8 @@ func (this *UploadSkuSync)Sync() error{
} }
` `
this.SkuReStr=Str*/ this.SkuReStr=Str*/
fmt.Println(this.SkuReStr) //打印初始数据
r:=gjson.Parse(this.SkuReStr) r:=gjson.Parse(this.SkuReStr)
if(r.Exists() && r.IsObject()){ if(r.Exists() && r.IsObject()){
this.SkuRes=parseRes(r) this.SkuRes=parseRes(r)
...@@ -92,7 +94,7 @@ func (this *UploadSkuSync)Sync() error{ ...@@ -92,7 +94,7 @@ func (this *UploadSkuSync)Sync() error{
//开始处理 //开始处理
func (this *UploadSkuSync) handle() { 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){ if(this.SkuRes.UpSn=="" || this.SkuRes.UploadLogId==0){
msg:=fmt.Sprintf("回调的消息UploadLogId 和 UpSn 为空或者为0%s",this.SkuReStr) msg:=fmt.Sprintf("回调的消息UploadLogId 和 UpSn 为空或者为0%s",this.SkuReStr)
this.dingdingSucessPush(msg); this.dingdingSucessPush(msg);
...@@ -220,7 +222,7 @@ func (this *UploadSkuSync) PushStatus3HandleList(uploadInfo *dao.UpdatesUploadSt ...@@ -220,7 +222,7 @@ func (this *UploadSkuSync) PushStatus3HandleList(uploadInfo *dao.UpdatesUploadSt
} }
listMsg:=string(bytes) listMsg:=string(bytes)
fmt.Printf("单号:%s, 已完成;发送 supplier_sku_callback 队列\n,data:%s",uploadInfo.UpSn,listMsg) 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) this.rabbitmqPush(listName,listMsg)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment