|
|
@@ -4,7 +4,6 @@ import ( |
|
|
|
"applet/app/db" |
|
|
|
"applet/app/db/model" |
|
|
|
"applet/app/utils" |
|
|
|
"applet/app/utils/cache" |
|
|
|
"applet/app/utils/logx" |
|
|
|
"applet/consume/md" |
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit" |
|
|
@@ -26,7 +25,7 @@ func ZhiosTikTokUpdate(queue md.MqQueue) { |
|
|
|
//1、将自己绑定到交换机上 |
|
|
|
ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) |
|
|
|
//2、取出数据进行消费 |
|
|
|
ch.Qos(20) |
|
|
|
ch.Qos(5) |
|
|
|
delivery := ch.Consume(queue.Name, true) |
|
|
|
|
|
|
|
var res amqp.Delivery |
|
|
@@ -58,7 +57,7 @@ func ZhiosTikTokAllUpdate(queue md.MqQueue) { |
|
|
|
//1、将自己绑定到交换机上 |
|
|
|
ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) |
|
|
|
//2、取出数据进行消费 |
|
|
|
ch.Qos(15) |
|
|
|
ch.Qos(5) |
|
|
|
delivery := ch.Consume(queue.Name, true) |
|
|
|
|
|
|
|
var res amqp.Delivery |
|
|
@@ -100,7 +99,7 @@ func handleZhiosTikTokGoodsUpdate(msg []byte) error { |
|
|
|
var v md.TikTokData |
|
|
|
json.Unmarshal([]byte(canalMsg.Data), &v) |
|
|
|
var tmp model.TikTokTeamGoods |
|
|
|
cache.HSet("tik_"+canalMsg.Mid, canalMsg.Cid+"_"+v.GoodsID, string(msg)) |
|
|
|
//cache.HSet("tik_"+canalMsg.Mid, canalMsg.Cid+"_"+v.GoodsID, string(msg)) |
|
|
|
get, _ := eg.Where("gid=? and activity_id=?", v.GoodsID, canalMsg.Cid).Get(&tmp) |
|
|
|
if get { |
|
|
|
//if tmp.IsDown == 1 { |
|
|
|