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