微信错误处理
This commit is contained in:
parent
451169b22d
commit
41df5bff23
|
|
@ -88,7 +88,7 @@ func (c *CpnRepoImpl) Order(ctx context.Context, order *bo.OrderBo) (string, err
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
if result.Response.Body != nil {
|
if result.Response != nil && result.Response.Body != nil {
|
||||||
return "", c.bodyErr(ctx, result)
|
return "", c.bodyErr(ctx, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,7 +116,7 @@ func (c *CpnRepoImpl) Query(ctx context.Context, orderWechat *bo.OrderBo) (vo.Or
|
||||||
resp, result, err := svc.QueryCoupon(ctx, req)
|
resp, result, err := svc.QueryCoupon(ctx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
if result.Response.Body != nil {
|
if result.Response != nil && result.Response.Body != nil {
|
||||||
return 0, c.bodyErr(ctx, result)
|
return 0, c.bodyErr(ctx, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -147,7 +147,7 @@ func (c *CpnRepoImpl) QueryProduct(ctx context.Context, stockCreatorMchId, stock
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
if result.Response.Body != nil {
|
if result.Response != nil && result.Response.Body != nil {
|
||||||
return nil, c.bodyErr(ctx, result)
|
return nil, c.bodyErr(ctx, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -172,7 +172,7 @@ func (c *CpnRepoImpl) QueryCallback(ctx context.Context) (*cashcoupons.Callback,
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
if result.Response.Body != nil {
|
if result.Response != nil && result.Response.Body != nil {
|
||||||
return nil, c.bodyErr(ctx, result)
|
return nil, c.bodyErr(ctx, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -199,7 +199,7 @@ func (c *CpnRepoImpl) SetCallback(ctx context.Context, url string) (*cashcoupons
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
if result.Response.Body != nil {
|
if result.Response != nil && result.Response.Body != nil {
|
||||||
return nil, c.bodyErr(ctx, result)
|
return nil, c.bodyErr(ctx, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue