京东商城订单转移修改
This commit is contained in:
@@ -1283,7 +1283,13 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int)
|
||||
return "", fmt.Errorf("未查询到该门店对应的平台信息!门店:[%v]", order.StoreID)
|
||||
}
|
||||
if len(order.VendorOrderID) > 12 {
|
||||
suffix := utils.Str2Int(order.VendorOrderID[12:len(order.VendorOrderID)])
|
||||
var goodsOrders []*model.GoodsOrder
|
||||
sql := `
|
||||
SELECT * FROM goods_order WHERE vendor_order_id2 = ? ORDER BY vendor_order_id DESC
|
||||
`
|
||||
sqlParams := []interface{}{order.VendorOrderID2}
|
||||
err = dao.GetRows(db, &goodsOrders, sql, sqlParams)
|
||||
suffix := utils.Str2Int(goodsOrders[0].VendorOrderID[12:len(goodsOrders[0].VendorOrderID)])
|
||||
suffix++
|
||||
order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(order.VendorOrderID2)*100000) + utils.Int2Str(suffix)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user