- revert to confirm 200 when calling freshfood from jx-callback.

This commit is contained in:
gazebo
2018-07-08 12:34:00 +08:00
parent a4093416a8
commit 704f232c99

View File

@@ -130,13 +130,13 @@ func (f *API) AccessFreshFood(apiStr string, params url.Values) error {
// err = error(nil)
// globals.SugarLogger.Debug(fullURL)
// globals.SugarLogger.Debug(params)
if err == nil && response != nil { // && response.StatusCode == 200 {
if err == nil && response != nil && response.StatusCode == 200 {
break
} else {
globals.SugarLogger.Infof("Call %s error:%v, response: %v", fullURL, err, response)
}
}
if err != nil { //|| response.StatusCode != 200 {
if err != nil || response.StatusCode != 200 {
globals.SugarLogger.Errorf("Call %s error:%v, url:%s, response: %v", fullURL, err, fullURL, response)
if err != nil {
return err
@@ -214,11 +214,12 @@ func (f *API) ELMOrderStatus(orderId string, status int, statusTime string) erro
}
func (f *API) ELMClientUrgeOrder(orderId string) error {
params := make(url.Values)
params.Set(URL_FRESHFOOD_PARA_VENDERID, utils.Int2Str(controllers.ELM_VENDERID))
params.Set(URL_FRESHFOOD_PARA_ORDERID, orderId)
return nil
// params := make(url.Values)
// params.Set(URL_FRESHFOOD_PARA_VENDERID, utils.Int2Str(controllers.ELM_VENDERID))
// params.Set(URL_FRESHFOOD_PARA_ORDERID, orderId)
return f.AccessFreshFood(URL_FRESHFOOD_ELEME_USER_URGE_ORDER, params)
// return f.AccessFreshFood(URL_FRESHFOOD_ELEME_USER_URGE_ORDER, params)
}
// mtps api