Commit 6f79295a by wang

fix

parent 3a1909fd
Showing with 10 additions and 3 deletions
...@@ -115,7 +115,11 @@ func (this *UploadSkuSync) handle() { ...@@ -115,7 +115,11 @@ func (this *UploadSkuSync) handle() {
uploadInfo,err:=dao.GetUploadLogInfo(this.SkuRes.UpSn) uploadInfo,err:=dao.GetUploadLogInfo(this.SkuRes.UpSn)
//如果sku是新增,就压入队列 es_sku_add //如果sku是新增,就压入队列 es_sku_add
this.PushInsertSkuMq(uploadInfo,updateItemStruct) handleFlag:=this.PushInsertSkuMq(uploadInfo,updateItemStruct)
if(!handleFlag){
msg:=fmt.Sprintf("没有返回值,原始队列字符串为:%s",this.SkuRes)
this.dingdingSucessPush(msg)
}
//修改UpdateLogItem 表 //修改UpdateLogItem 表
err=dao.UpdateLogItem(this.SkuRes.UpSn,this.SkuRes.UploadLogId,updateItemStruct) err=dao.UpdateLogItem(this.SkuRes.UpSn,this.SkuRes.UploadLogId,updateItemStruct)
...@@ -174,8 +178,9 @@ func (this *UploadSkuSync)PushWechatMsg(uploadInfo *dao.UpdatesUploadStruct) { ...@@ -174,8 +178,9 @@ func (this *UploadSkuSync)PushWechatMsg(uploadInfo *dao.UpdatesUploadStruct) {
} }
//如果sku是新增,就压入队列 es_sku_add //如果sku是新增,就压入队列 es_sku_add
func (this *UploadSkuSync) PushInsertSkuMq(uploadInfo *dao.UpdatesUploadStruct,updateItemStruct dao.UpdateItemStruct) { func (this *UploadSkuSync) PushInsertSkuMq(uploadInfo *dao.UpdatesUploadStruct,updateItemStruct dao.UpdateItemStruct) bool{
fmt.Println("进入 PushInsertSkuMq 函数")
fmt.Printf("单号:%s,skuid:%d;的状态为%d\n",uploadInfo.UpSn,updateItemStruct.SkuId,updateItemStruct.SkuStatus) fmt.Printf("单号:%s,skuid:%d;的状态为%d\n",uploadInfo.UpSn,updateItemStruct.SkuId,updateItemStruct.SkuStatus)
if(updateItemStruct.SkuStatus==1){ if(updateItemStruct.SkuStatus==1){
...@@ -188,13 +193,15 @@ func (this *UploadSkuSync) PushInsertSkuMq(uploadInfo *dao.UpdatesUploadStruct,u ...@@ -188,13 +193,15 @@ func (this *UploadSkuSync) PushInsertSkuMq(uploadInfo *dao.UpdatesUploadStruct,u
msg:=fmt.Sprintf("推送新增sku队列,解析为json报错") msg:=fmt.Sprintf("推送新增sku队列,解析为json报错")
fmt.Println(msg) fmt.Println(msg)
this.dingdingSucessPush(msg); this.dingdingSucessPush(msg);
return return true
//return fmt.Errorf(msg)
} }
listMsg:=string(bytes) listMsg:=string(bytes)
fmt.Printf("单号:%s,skuid:%d ;发送 es_sku_add 队列\n,data:%s",uploadInfo.UpSn,updateItemStruct.SkuId,listMsg) fmt.Printf("单号:%s,skuid:%d ;发送 es_sku_add 队列\n,data:%s",uploadInfo.UpSn,updateItemStruct.SkuId,listMsg)
listName:="es_sku_add" listName:="es_sku_add"
this.rabbitmqPush(listName,listMsg) this.rabbitmqPush(listName,listMsg)
} }
return true
} }
//after2 := time.After(2*time.Second) //after2 := time.After(2*time.Second)
//push到下架商品的队列 //push到下架商品的队列
......
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