1
This commit is contained in:
@@ -147,17 +147,21 @@ func (a *API) GetCallbackUrlIndex(request *http.Request) (map[string]interface{}
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
urlIndex = ""
|
urlIndex = ""
|
||||||
temp = map[string]interface{}{}
|
orderStatus float64
|
||||||
|
temp = map[string]interface{}{}
|
||||||
)
|
)
|
||||||
if err = json.Unmarshal(data, &temp); err == nil {
|
if err = json.Unmarshal(data, &temp); err == nil {
|
||||||
globals.SugarLogger.Debugf("GetCallbackUrlIndex temp=%s", utils.Format4Output(temp, false))
|
globals.SugarLogger.Debugf("GetCallbackUrlIndex temp=%s", utils.Format4Output(temp, false))
|
||||||
urlIndex = temp["url_index"].(string)
|
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)
|
result := make(map[string]interface{}, 0)
|
||||||
|
if orderStatus == OrderStatusFinished {
|
||||||
|
urlIndex = UrlIndexOrderComplete
|
||||||
|
}
|
||||||
switch urlIndex {
|
switch urlIndex {
|
||||||
case UrlIndexRiderStatus:
|
case UrlIndexRiderStatus:
|
||||||
retVal := RiderStatus{}
|
retVal := RiderStatus{}
|
||||||
|
|||||||
@@ -65,12 +65,12 @@ func TestCreateOrder(t *testing.T) {
|
|||||||
DevId: AppID,
|
DevId: AppID,
|
||||||
ShopId: TestSFStoreID,
|
ShopId: TestSFStoreID,
|
||||||
ShopType: 1,
|
ShopType: 1,
|
||||||
ShopOrderId: "20230908Test",
|
ShopOrderId: "20230908-2",
|
||||||
OrderSequence: "测试",
|
OrderSequence: "测试",
|
||||||
OrderSource: OrderSourceELM,
|
OrderSource: OrderSourceELM,
|
||||||
OrderTime: 1694163550,
|
OrderTime: 1694165402,
|
||||||
LbsType: LbsTypeGD,
|
LbsType: LbsTypeGD,
|
||||||
PushTime: 1694163550,
|
PushTime: 1694165402,
|
||||||
Version: 19,
|
Version: 19,
|
||||||
ReturnFlag: 511,
|
ReturnFlag: 511,
|
||||||
Receive: &ReceiveAddress{
|
Receive: &ReceiveAddress{
|
||||||
|
|||||||
Reference in New Issue
Block a user