diff --git a/platformapi/tao_vegetable/order_afs.go b/platformapi/tao_vegetable/order_afs.go index 3e3f9832..c90afe33 100644 --- a/platformapi/tao_vegetable/order_afs.go +++ b/platformapi/tao_vegetable/order_afs.go @@ -100,7 +100,7 @@ func (a *API) UserApplyRefund(c *http.Request) (*UserApplyRefundCallBack, error) return nil, err } var result *UserApplyRefundCallBack - if err := json.Unmarshal(data, result); err != nil { + if err := json.Unmarshal(data, &result); err != nil { return nil, err } return result, nil @@ -117,7 +117,7 @@ func (a *API) UserCancelRefundApply(c *http.Request) (*UserCancelRefundApply, er return nil, err } var result *UserCancelRefundApply - if err := json.Unmarshal(data, result); err != nil { + if err := json.Unmarshal(data, &result); err != nil { return nil, err } return result, nil @@ -148,7 +148,7 @@ func (a *API) RefundOrderFinish(c *http.Request) (*RefundOrderFinish, error) { return nil, nil } var result *RefundOrderFinish - if err := json.Unmarshal(data, result); err != nil { + if err := json.Unmarshal(data, &result); err != nil { return nil, err } return result, nil diff --git a/platformapi/tao_vegetable/order_delivery.go b/platformapi/tao_vegetable/order_delivery.go index 0dbe3079..a013692f 100644 --- a/platformapi/tao_vegetable/order_delivery.go +++ b/platformapi/tao_vegetable/order_delivery.go @@ -16,6 +16,9 @@ import ( func (a *API) ReaderOrderInfo(c *http.Request) (*CallbackOrder, error) { body, _ := ioutil.ReadAll(c.Body) + if len(body) == 0 { + return nil, nil + } var callbackOrder *CallbackOrder if err := json.Unmarshal(body, &callbackOrder); err != nil { return nil, err