修改订阅

finance
杨赟 2 years ago
parent f4997bb5c6
commit f15510acf7

@ -10,7 +10,6 @@ const (
MqSubscribeNameSkuPriceChange = "sku_price_change" // sku价格变动
MqSubscribeNameSkuChange = "sku_change" // sku信息变动
MqSubscribeNameOrderSplit = "order_split" // 订单拆单
MqSubscribeNameOrderLadingBill = "order_lading_bill" // 提单
MqSubscribeNameOrderStockOut = "order_stock_out" // 订单出库
MqSubscribeNameOrderFinish = "order_finish" // 订单完成
MqSubscribeNameOrderCancel = "order_cancel" // 订单取消
@ -24,13 +23,12 @@ type ArgsMqSubscribe struct {
}
// Subscribe @Title 订阅mq
func (m *mq) Subscribe(ctx context.Context, channelId string, args ArgsMqSubscribe) (err error) {
reply := 0
func (m *mq) Subscribe(ctx context.Context, channelId string, args ArgsMqSubscribe) (key string, err error) {
xClient, err := client.GetClient(m)
if err != nil {
return
}
err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Subscribe", args, &reply)
err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Subscribe", args, &key)
return
}

Loading…
Cancel
Save