Commit 003c8941 by huangchengyi

1.0

parent 8e455874
Showing with 1 additions and 2 deletions
......@@ -122,6 +122,7 @@ func (qs *ZiyingService) ZyGoodsDetail(ctx *gin.Context,goodsIds []string, ch ch
A.Set("mpl", gjson.Get(info, "mpl").Int()) //
//处理库存
A.Set("stock",0) //默认库存为0
dbStock := gjson.Get(info, "stock").Int() //当前db库存
if dbStock > 0 {
lockStock := qs.skuLockNum(&redisConn,goods_id) //当前锁库库存
......@@ -129,8 +130,6 @@ func (qs *ZiyingService) ZyGoodsDetail(ctx *gin.Context,goodsIds []string, ch ch
if stockG >0 {
A.Set("actual_stock", gjson.Get(info, "actual_stock").Int()) //锁定库存
A.Set("stock",dbStock)
}else{
A.Set("stock",0)
}
A.Set("saler_atio", "") //
}
......
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