mock 满足招行第一次失败,二次成功
This commit is contained in:
parent
647fb437f2
commit
bb4b857d9c
|
|
@ -39,7 +39,7 @@ func (v *VoucherBiz) CmbOrder(ctx context.Context, req *bo.OrderCreateReqBo) (or
|
|||
}
|
||||
|
||||
orderNo = order.OrderNo
|
||||
return orderNo, nil
|
||||
return orderNo, err
|
||||
}
|
||||
|
||||
product, err3 := v.ProductRepo.GetByProductNo(ctx, req.ProductNo)
|
||||
|
|
|
|||
|
|
@ -37,6 +37,13 @@ func (v *VoucherBiz) order(ctx context.Context, req *bo.OrderCreateReqBo, produc
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// 模拟一次失败
|
||||
if err3 := v.fail(ctx, order, "mock 满足招行第一次失败,二次成功"); err3 != nil {
|
||||
return nil, err3
|
||||
}
|
||||
|
||||
return order, nil
|
||||
|
||||
return order, v.success(ctx, order, voucherNo)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue