- jd storepage GetStoreOrderInfo add param stationNo

This commit is contained in:
gazebo
2019-03-20 16:32:49 +08:00
parent 2293cae175
commit 2ae693e56e
3 changed files with 13 additions and 6 deletions

View File

@@ -66,16 +66,20 @@ func (a *API) AccessStorePage(subURL string) (retVal map[string]interface{}, err
return retVal, err
}
func (a *API) GetRealMobile4Order(orderId string) (mobile string, err error) {
retVal, err := a.GetStoreOrderInfo(orderId)
func (a *API) GetRealMobile4Order(orderId, stationNo string) (mobile string, err error) {
retVal, err := a.GetStoreOrderInfo(orderId, stationNo)
if err == nil {
return retVal["mobile"].(string), nil
}
return "", err
}
func (a *API) GetStoreOrderInfo(orderId string) (storeOrderInfo map[string]interface{}, err error) {
retVal, err := a.AccessStorePage(fmt.Sprintf("order/newManager/search?pageNo=1&pageSize=1&orderBy=&desc=true&param=%s&stationNo=", orderId))
func (a *API) GetStoreOrderInfo(orderId, stationNo string) (storeOrderInfo map[string]interface{}, err error) {
urlStr := "order/newManager/search?pageNo=1&pageSize=1&orderBy=&desc=true&param=" + orderId
if stationNo != "" {
urlStr += "&stationNo=" + stationNo
}
retVal, err := a.AccessStorePage(urlStr)
// baseapi.SugarLogger.Debug(utils.Format4Output(retVal, false))
if err == nil {
newOrderinfoMains := retVal["result"].(map[string]interface{})["newOrderinfoMains"].(map[string]interface{})