This commit is contained in:
richboo111
2023-09-08 17:33:48 +08:00
parent 419df0dc52
commit 678545131a
2 changed files with 11 additions and 7 deletions

View File

@@ -147,17 +147,21 @@ func (a *API) GetCallbackUrlIndex(request *http.Request) (map[string]interface{}
}
var (
urlIndex = ""
temp = map[string]interface{}{}
urlIndex = ""
orderStatus float64
temp = map[string]interface{}{}
)
if err = json.Unmarshal(data, &temp); err == nil {
globals.SugarLogger.Debugf("GetCallbackUrlIndex temp=%s", utils.Format4Output(temp, false))
urlIndex = temp["url_index"].(string)
fmt.Println(urlIndex)
orderStatus = temp["order_status"].(float64)
globals.SugarLogger.Debugf("GetCallbackUrlIndex urlIndex=%s,orderStatus=%d", urlIndex, orderStatus)
}
result := make(map[string]interface{}, 0)
if orderStatus == OrderStatusFinished {
urlIndex = UrlIndexOrderComplete
}
switch urlIndex {
case UrlIndexRiderStatus:
retVal := RiderStatus{}