京东商城订单数据修改
This commit is contained in:
@@ -1109,7 +1109,6 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o
|
|||||||
order.ConsigneeLng = jxutils.StandardCoordinate2Int(lng)
|
order.ConsigneeLng = jxutils.StandardCoordinate2Int(lng)
|
||||||
order.ConsigneeLat = jxutils.StandardCoordinate2Int(lat)
|
order.ConsigneeLat = jxutils.StandardCoordinate2Int(lat)
|
||||||
}
|
}
|
||||||
|
|
||||||
storeList, err := common.GetStoreListByLocation(ctx, jxutils.IntCoordinate2Standard(order.ConsigneeLng), jxutils.IntCoordinate2Standard(order.ConsigneeLat), 5000, false, true)
|
storeList, err := common.GetStoreListByLocation(ctx, jxutils.IntCoordinate2Standard(order.ConsigneeLng), jxutils.IntCoordinate2Standard(order.ConsigneeLat), 5000, false, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
globals.SugarLogger.Debugf("jds GetStoreListByLocation error: %v", err.Error())
|
globals.SugarLogger.Debugf("jds GetStoreListByLocation error: %v", err.Error())
|
||||||
@@ -1121,13 +1120,12 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o
|
|||||||
if len(storeMaps) > 0 {
|
if len(storeMaps) > 0 {
|
||||||
order.VendorStoreID = storeMaps[0].VendorStoreID
|
order.VendorStoreID = storeMaps[0].VendorStoreID
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
//如果是暂停,表示是预订单
|
//如果是暂停,表示是预订单
|
||||||
if jdsOrder.OrderStatus == jdshopapi.JdsOrderStatusPause {
|
if jdsOrder.OrderStatus == jdshopapi.JdsOrderStatusPause {
|
||||||
order.BusinessType = model.BusinessTypeDingshida
|
order.BusinessType = model.BusinessTypeDingshida
|
||||||
order.ExpectedDeliveredTime = utils.Str2Time(orderDetail.ExpectedDeliveredTime)
|
order.ExpectedDeliveredTime = utils.Str2Time(orderDetail.ExpectedDeliveredTime)
|
||||||
} else if jdsOrder.OrderStatus == jdshopapi.JdsOrderStatusWaittingExport {
|
} else if jdsOrder.OrderStatus == jdshopapi.JdsOrderStatusWaittingExport {
|
||||||
order.ExpectedDeliveredTime = order.CreatedAt.Add(time.Hour)
|
order.ExpectedDeliveredTime = order.OrderCreatedAt.Add(time.Hour)
|
||||||
order.BusinessType = model.BusinessTypeImmediate
|
order.BusinessType = model.BusinessTypeImmediate
|
||||||
} else {
|
} else {
|
||||||
globals.SugarLogger.Errorf("未知的京东商城订单状态!status : %v", jdsOrder.OrderStatus)
|
globals.SugarLogger.Errorf("未知的京东商城订单状态!status : %v", jdsOrder.OrderStatus)
|
||||||
@@ -1191,11 +1189,12 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int)
|
|||||||
waybill = v
|
waybill = v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Println("test1111", utils.Format4Output(partner.DeliveryPlatformHandlers, false))
|
if waybill.WaybillVendorID != model.VendorIDJDWL {
|
||||||
handler := partner.DeliveryPlatformHandlers[waybill.WaybillVendorID]
|
handler := partner.DeliveryPlatformHandlers[waybill.WaybillVendorID]
|
||||||
err = handler.Handler.CancelWaybill(waybill, 0, "订单转移被取消")
|
err = handler.Handler.CancelWaybill(waybill, 0, "订单转移被取消")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err = jdshop.ChangeOrderStatus(vendorOrderID, model.OrderStatusCanceled, "订单转移被取消")
|
err = jdshop.ChangeOrderStatus(vendorOrderID, model.OrderStatusCanceled, "订单转移被取消")
|
||||||
|
|||||||
@@ -94,3 +94,7 @@ func (c *DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInf
|
|||||||
func (c *DeliveryHandler) ComplaintRider(bill *model.Waybill, resonID int, resonContent string) (err error) {
|
func (c *DeliveryHandler) ComplaintRider(bill *model.Waybill, resonID int, resonContent string) (err error) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *DeliveryHandler) OnWaybillMsg() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -1 +1,7 @@
|
|||||||
package jdeclp
|
package jdeclp
|
||||||
|
|
||||||
|
import "git.rosy.net.cn/jx-callback/globals/testinit"
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
testinit.Init()
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user