微信回调消费接收消息成功
This commit is contained in:
parent
216500e4d1
commit
73a0321d99
|
|
@ -88,7 +88,11 @@ func (c *CpnRepoImpl) Order(ctx context.Context, order *bo.OrderBo) (string, err
|
|||
|
||||
if err != nil {
|
||||
|
||||
return "", c.bodyErr(ctx, result)
|
||||
if result.Response.Body != nil {
|
||||
return "", c.bodyErr(ctx, result)
|
||||
}
|
||||
|
||||
return "", err
|
||||
}
|
||||
|
||||
return *resp.CouponId, nil
|
||||
|
|
@ -112,7 +116,11 @@ func (c *CpnRepoImpl) Query(ctx context.Context, orderWechat *bo.OrderBo) (vo.Or
|
|||
resp, result, err := svc.QueryCoupon(ctx, req)
|
||||
if err != nil {
|
||||
|
||||
return 0, c.bodyErr(ctx, result)
|
||||
if result.Response.Body != nil {
|
||||
return 0, c.bodyErr(ctx, result)
|
||||
}
|
||||
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return CpnStatus(*resp.Status).GetStatus()
|
||||
|
|
@ -139,7 +147,11 @@ func (c *CpnRepoImpl) QueryProduct(ctx context.Context, stockCreatorMchId, stock
|
|||
|
||||
if err != nil {
|
||||
|
||||
return nil, c.bodyErr(ctx, result)
|
||||
if result.Response.Body != nil {
|
||||
return nil, c.bodyErr(ctx, result)
|
||||
}
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return response, nil
|
||||
|
|
@ -160,7 +172,11 @@ func (c *CpnRepoImpl) QueryCallback(ctx context.Context) (*cashcoupons.Callback,
|
|||
|
||||
if err != nil {
|
||||
|
||||
return nil, c.bodyErr(ctx, result)
|
||||
if result.Response.Body != nil {
|
||||
return nil, c.bodyErr(ctx, result)
|
||||
}
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return response, nil
|
||||
|
|
@ -183,7 +199,11 @@ func (c *CpnRepoImpl) SetCallback(ctx context.Context, url string) (*cashcoupons
|
|||
|
||||
if err != nil {
|
||||
|
||||
return nil, c.bodyErr(ctx, result)
|
||||
if result.Response.Body != nil {
|
||||
return nil, c.bodyErr(ctx, result)
|
||||
}
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return response, nil
|
||||
|
|
|
|||
Loading…
Reference in New Issue