还原
This commit is contained in:
@@ -1508,7 +1508,7 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int)
|
||||
if len(order.VendorOrderID2) > 18 {
|
||||
order.VendorOrderID2 = order.VendorOrderID2[0:12]
|
||||
}
|
||||
order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(order.VendorOrderID2)*100) + utils.Int2Str(time.Now().Second())
|
||||
order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(order.VendorOrderID2)*10000000) + utils.Int2Str(time.Now().Second())
|
||||
if len(order.VendorOrderID) < 18 {
|
||||
order.VendorOrderID = order.VendorOrderID + "0"
|
||||
}
|
||||
@@ -1987,7 +1987,7 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o
|
||||
continue
|
||||
}
|
||||
//有可能是库里已经有这个订单了
|
||||
orderE, err := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(jdsOrder.OrderID)+"001", model.VendorIDJDShop)
|
||||
orderE, err := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(jdsOrder.OrderID)+"00000001", model.VendorIDJDShop)
|
||||
if orderE != nil {
|
||||
continue
|
||||
}
|
||||
@@ -1999,7 +1999,7 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o
|
||||
}
|
||||
order := &model.GoodsOrder{
|
||||
VendorOrderID2: utils.Int64ToStr(jdsOrder.OrderID),
|
||||
VendorOrderID: utils.Int64ToStr(jdsOrder.OrderID) + "001",
|
||||
VendorOrderID: utils.Int64ToStr(jdsOrder.OrderID) + "00000001",
|
||||
VendorID: model.VendorIDJDShop,
|
||||
BaseFreightMoney: jxutils.StandardPrice2Int(jdsOrder.Freight),
|
||||
VendorStatus: utils.Int2Str(jdsOrder.OrderStatus),
|
||||
|
||||
@@ -98,13 +98,13 @@ func result2Orders(msg *jdshopapi.CallBackResult) (order *model.GoodsOrder, err
|
||||
db = dao.GetDB()
|
||||
)
|
||||
//有可能是库里已经有这个订单了
|
||||
orderE, err := partner.CurOrderManager.LoadOrder(msg.OrderID+"001", model.VendorIDJDShop)
|
||||
orderE, err := partner.CurOrderManager.LoadOrder(msg.OrderID+"00000001", model.VendorIDJDShop)
|
||||
if orderE != nil {
|
||||
return order, fmt.Errorf("已经存在此订单!")
|
||||
}
|
||||
order = &model.GoodsOrder{
|
||||
VendorOrderID2: msg.OrderID,
|
||||
VendorOrderID: msg.OrderID + "001",
|
||||
VendorOrderID: msg.OrderID + "00000001",
|
||||
VendorID: model.VendorIDJDShop,
|
||||
BaseFreightMoney: jxutils.StandardPrice2Int(utils.Str2Float64(msg.FreightPrice)),
|
||||
VendorStatus: msg.OrderState,
|
||||
|
||||
Reference in New Issue
Block a user