1
This commit is contained in:
@@ -64,26 +64,19 @@ type RiderRecall struct {
|
|||||||
|
|
||||||
// OrderComplete 订单完成回调
|
// OrderComplete 订单完成回调
|
||||||
type OrderComplete struct {
|
type OrderComplete struct {
|
||||||
OrderID string `json:"order_id"`
|
OperatorName string `json:"operator_name"` //配送员姓名
|
||||||
ShopId float64 `json:"shop_id"` // 店铺ID
|
OperatorPhone string `json:"operator_phone"` //配送员电话
|
||||||
OutOrderID string `json:"out_order_id"`
|
OrderStatus float64 `json:"order_status"` //17配送员点击完成
|
||||||
OrderStatus float64 `json:"order_status"` //17配送员点击完成
|
PushTime int `json:"push_time"` //完成时间
|
||||||
StatusDesc string `json:"status_desc"` //状态描述
|
ReceiRptType float64 `json:"receiRpt_type"`
|
||||||
RiderName string `json:"rider_name"`
|
RiderLat float64 `json:"rider_lat"`
|
||||||
RiderPhone string `json:"rider_phone"`
|
RiderLng float64 `json:"rider_lng"`
|
||||||
PushTime int `json:"push_time"` //完成时间
|
SfOrderID string `json:"sf_order_id"`
|
||||||
TotalPrice float64 `json:"total_price"`
|
SfUcode string `json:"sf_ucode"`
|
||||||
DeliveryDistanceMeter float64 `json:"delivery_distance_meter"`
|
ShopId float64 `json:"shop_id"` // 店铺ID
|
||||||
WeightGram float64 `json:"weight_gram"`
|
ShopOrderID string `json:"shop_order_id"`
|
||||||
StartTime int `json:"start_time"`
|
StatusDesc string `json:"status_desc"` //状态描述
|
||||||
ExpectTime int `json:"expect_time"`
|
UrlIndex string `json:"url_index"`
|
||||||
TotalPayMoney float64 `json:"total_pay_money"`
|
|
||||||
RealPayMoney float64 `json:"real_pay_money"`
|
|
||||||
CouponsTotalFee float64 `json:"coupons_total_fee"`
|
|
||||||
SettlementType float64 `json:"settlement_type"`
|
|
||||||
PckUpCode float64 `json:"pck_up_code"`
|
|
||||||
CompleteCode float64 `json:"complete_code"`
|
|
||||||
OverflowFee float64 `json:"overflow_fee"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SFCancel 顺丰原因订单取消回调
|
// SFCancel 顺丰原因订单取消回调
|
||||||
@@ -147,22 +140,21 @@ func (a *API) GetCallbackUrlIndex(request *http.Request) (map[string]interface{}
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
urlIndex = ""
|
urlIndex = ""
|
||||||
orderStatus float64
|
temp = map[string]interface{}{}
|
||||||
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)
|
||||||
orderStatus = temp["order_status"].(float64)
|
//orderStatus = temp["order_status"].(float64)
|
||||||
globals.SugarLogger.Debugf("GetCallbackUrlIndex urlIndex=%s,orderStatus=%d", urlIndex, int(orderStatus))
|
globals.SugarLogger.Debugf("GetCallbackUrlIndex urlIndex=%s", urlIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
result := make(map[string]interface{}, 0)
|
result := make(map[string]interface{}, 0)
|
||||||
if orderStatus == utils.Int2Float64(OrderStatusFinished) {
|
//if orderStatus == utils.Int2Float64(OrderStatusFinished) {
|
||||||
urlIndex = UrlIndexOrderComplete
|
// urlIndex = UrlIndexOrderComplete
|
||||||
globals.SugarLogger.Debugf("我在这 urlIndex=%s", urlIndex)
|
// globals.SugarLogger.Debugf("我在这 urlIndex=%s", urlIndex)
|
||||||
}
|
//}
|
||||||
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: "20230908-3",
|
ShopOrderId: "2023090805",
|
||||||
OrderSequence: "测试",
|
OrderSequence: "测试",
|
||||||
OrderSource: OrderSourceELM,
|
OrderSource: OrderSourceELM,
|
||||||
OrderTime: 1694165716,
|
OrderTime: 1694167348,
|
||||||
LbsType: LbsTypeGD,
|
LbsType: LbsTypeGD,
|
||||||
PushTime: 1694165716,
|
PushTime: 1694167348,
|
||||||
Version: 19,
|
Version: 19,
|
||||||
ReturnFlag: 511,
|
ReturnFlag: 511,
|
||||||
Receive: &ReceiveAddress{
|
Receive: &ReceiveAddress{
|
||||||
|
|||||||
Reference in New Issue
Block a user