cmb
This commit is contained in:
parent
5dbd4762b4
commit
9b607a61ed
|
|
@ -11,7 +11,7 @@ func Test_OrderProducer(t *testing.T) {
|
|||
m := make(map[string]*conf.EventMap)
|
||||
|
||||
m["order"] = &conf.EventMap{
|
||||
Topic: "order",
|
||||
Topic: "voucher_order_order",
|
||||
}
|
||||
|
||||
c := &conf.RocketMQ{
|
||||
|
|
@ -46,7 +46,7 @@ func Test_NotifyProducer(t *testing.T) {
|
|||
m := make(map[string]*conf.EventMap)
|
||||
|
||||
m["notify"] = &conf.EventMap{
|
||||
Topic: "notify",
|
||||
Topic: "voucher_order_notify",
|
||||
}
|
||||
|
||||
c := &conf.RocketMQ{
|
||||
|
|
@ -64,15 +64,15 @@ func Test_NotifyProducer(t *testing.T) {
|
|||
}
|
||||
|
||||
ctx := context.Background()
|
||||
orderNo := ""
|
||||
shardingKey := "752893584043413505_752893587050733569"
|
||||
|
||||
eventMap := c.EventMap["notify"]
|
||||
sendOption := []mq.SendOption{
|
||||
mq.WithSendShardingKeysOption(orderNo),
|
||||
mq.WithSendShardingKeysOption(shardingKey),
|
||||
}
|
||||
|
||||
if err = mqx.SendSync(ctx, eventMap.Topic, []byte("{}"), sendOption...); err != nil {
|
||||
t.Errorf("入队失败 error = %v", err)
|
||||
t.Errorf("回调通知入队失败 error = %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ func (p *OrderNotifyRepoImpl) Create(ctx context.Context, req *bo.OrderNotifyBo)
|
|||
OutRequestNo: req.OutRequestNo,
|
||||
Status: vo.OrderNotifyStatusWait.GetValue(),
|
||||
Request: req.Request,
|
||||
Responses: "{}",
|
||||
NotifyUrl: req.NotifyUrl,
|
||||
CreateTime: &now,
|
||||
UpdateTime: &now,
|
||||
|
|
|
|||
Loading…
Reference in New Issue