Commit 44c63e35 by hcy

PhysicalStock

parents 9ca54863 3013fdc1
Showing with 4 additions and 0 deletions
......@@ -124,6 +124,7 @@ type Spot struct {
// Stock int `json:"stock"`
// BatchSn string `json:"batch_sn"`
// SinglePrice string `json:"single_price"`
// NewCost string `json:"new_cost"`
}
type DiscountRatio struct {
......
......@@ -307,6 +307,9 @@ func (ls *LyService) GetStock(sku model.LySku) (stock_all int64, jd_stock int64,
}
sku.PhysicalStock = sku.Stock - int64(sku.OnwayStock) - (lockStock - skuLockStockOnway) //实际库存
if sku.PhysicalStock < 0 {
sku.PhysicalStock = 0
}
sku.OnwayStock = sku.OnwayStock - int(skuLockStockOnway) //在途库存
//获取京东库存
jdStockShiwuStr, _ := redis.String(redisCon.Do("HGET", "sku_jd_stock", sku.GoodsId)) // 京东单个sku实物总数量
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment