This commit is contained in:
苏尹岚
2021-04-07 14:00:43 +08:00
parent b5aa8748ec
commit 98f443379d
2 changed files with 11 additions and 0 deletions

View File

@@ -1533,6 +1533,16 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int)
for _, sku := range skus {
sku.VendorOrderID = order.VendorOrderID
sku.ID = 0
var storesSku *model.StoreSkuBind
sql := `
SELECT * FROM store_sku_bind WHERE deleted_at = ? AND store_id = ? AND jds_id = ?
`
sqlParams := []interface{}{utils.DefaultTimeValue, model.JdShopMainStoreID, sku.VendorSkuID}
if err = dao.GetRow(db, &storesSku, sql, sqlParams); err == nil && storesSku != nil {
if realStoresSkus, err := dao.GetStoresSkusInfo(db, []int{storeID}, []int{storesSku.SkuID}); err == nil && len(realStoresSkus) > 0 {
sku.ShopPrice = int64(realStoresSkus[0].Price)
}
}
order.Skus = append(order.Skus, sku)
}
setJdsOrderSeq(order)