三平台商品 水印,京东商城订单转移

This commit is contained in:
苏尹岚
2020-06-17 18:31:25 +08:00
parent 9cf268ae78
commit 472c1f34e1
6 changed files with 52 additions and 23 deletions

View File

@@ -1183,16 +1183,18 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int)
if len(storeMaps) > 0 {
order.StoreID = storeID
order.StoreName = storeMaps[0].StoreName
order.VendorStoreID = storeMaps[0].VendorStoreID
} else {
return "", fmt.Errorf("未查询到该门店对应的平台信息!门店:[%v]", order.StoreID)
}
if len(order.VendorOrderID) > 12 {
suffix := utils.Str2Int(order.VendorOrderID[12:len(order.VendorOrderID)])
suffix++
order.VendorOrderID = order.VendorOrderID2 + utils.Int2Str(suffix)
order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(order.VendorOrderID2)*10) + utils.Int2Str(suffix)
}
for _, sku := range skus {
sku.VendorOrderID = order.VendorOrderID
sku.ID = 0
order.Skus = append(order.Skus, sku)
}
order.Status = model.OrderStatusNew