1
This commit is contained in:
@@ -720,20 +720,24 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
|
||||
// GetCyclingLine 获取骑行路线
|
||||
func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, distance, duration int64, err error) {
|
||||
// 百度
|
||||
/*var coords []*baidunavi.Coordinate
|
||||
coords = append(coords, &baidunavi.Coordinate{
|
||||
Lng: sLng,
|
||||
Lat: sLat,
|
||||
}, &baidunavi.Coordinate{
|
||||
Lat: uLat,
|
||||
Lng: uLng,
|
||||
})
|
||||
/* var coords []*baidunavi.Coordinate
|
||||
coords = append(coords, &baidunavi.Coordinate{
|
||||
Lng: sLng,
|
||||
Lat: sLat,
|
||||
}, &baidunavi.Coordinate{
|
||||
Lat: uLat,
|
||||
Lng: uLng,
|
||||
})*/
|
||||
|
||||
// 高德坐标转换成百度坐标
|
||||
coords, err = api.TencentMapAPI.TencentCoordinateChange(coords, baidunavi.CoordSysGaoDe2Baidu)
|
||||
/*coords, err := api.TencentMapAPI.TencentCoordinateChange(&tencent_map.TencentCoordinateChangeReq{
|
||||
Locations: fmt.Sprintf("%.6f,%.6f;%.6f,%.6f", sLat, sLng, uLat, uLng),
|
||||
Type: tencent_map.CoordinateChangeTypeBaidu,
|
||||
})
|
||||
if err != nil || len(coords) <= model.NO {
|
||||
return nil, 0, 0, err
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
distance, duration, polyLineList, err = api.TencentMapAPI.TencentCyclingPlanning(&tencent_map.TencentCyclingPlanningReq{
|
||||
From: fmt.Sprintf("%.6f,%.6f", sLat, sLng),
|
||||
To: fmt.Sprintf("%.6f,%.6f", uLat, uLng),
|
||||
|
||||
@@ -32,7 +32,7 @@ func TestOnFinancialMsg(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOnOrderDetail(t *testing.T) {
|
||||
orderID := "4088600070462723689"
|
||||
orderID := "4074700081425894134"
|
||||
result, err := api.EbaiAPI.OrderGet(orderID)
|
||||
if err == nil {
|
||||
new(PurchaseHandler).OnOrderDetail(result, partner.CreatedPeration)
|
||||
|
||||
@@ -276,6 +276,9 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
order.StoreID = 0
|
||||
}
|
||||
order.Status = p.getStatusFromVendorStatus(order.VendorStatus)
|
||||
if order.Status >= model.OrderStatusEndBegin {
|
||||
order.OrderFinishedAt = time.Now()
|
||||
}
|
||||
if utils.MustInterface2Int64(orderMap["send_immediately"]) == 1 {
|
||||
order.BusinessType = model.BusinessTypeImmediate
|
||||
} else {
|
||||
@@ -555,6 +558,9 @@ func (c *PurchaseHandler) onOrderMsg(msg *ebaiapi.CallbackMsg) (retVal *ebaiapi.
|
||||
if err == nil {
|
||||
err = partner.CurOrderManager.OnOrderAdjust(order, status)
|
||||
}
|
||||
if order.OrderFinishedAt != utils.ZeroTimeValue {
|
||||
partner.CurOrderManager.UpdateOrderFields(order, []string{"OrderFinishedAt"})
|
||||
}
|
||||
} else {
|
||||
// 处理饿百降级订单的情况
|
||||
// 是否降级;1:是,0:否;极少数订单因网络或信息交互异常,导致订单部分字段(如订单金额)生成延迟,此时订单会被标记为“已降级”状态,需开发者重新调用查看订单详情接口获取完整订单数据。
|
||||
|
||||
Reference in New Issue
Block a user