Merge remote-tracking branch 'origin/mark' into jdshop
This commit is contained in:
@@ -1283,7 +1283,13 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int)
|
|||||||
return "", fmt.Errorf("未查询到该门店对应的平台信息!门店:[%v]", order.StoreID)
|
return "", fmt.Errorf("未查询到该门店对应的平台信息!门店:[%v]", order.StoreID)
|
||||||
}
|
}
|
||||||
if len(order.VendorOrderID) > 12 {
|
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++
|
suffix++
|
||||||
order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(order.VendorOrderID2)*100000) + utils.Int2Str(suffix)
|
order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(order.VendorOrderID2)*100000) + utils.Int2Str(suffix)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user