Commit 3b61fdee by hcy001
parents 8d7b618c 07fde388
......@@ -162,6 +162,11 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
//判断是否可以购买
sku.IsBuy = ls.GetIsBuy(sku)
////过期修改库存为0
//if sku.IsExpire == 1 {
// sku.Stock = 0
//}
//用spuInfo补全信息
sku = ls.CombineSup(sku, spu)
//最后一步,将sku的全部信息放到有序map里面
......
......@@ -318,8 +318,19 @@ func (ls *LyService) GetDelivery(supplierId int64, canal string) (delivery map[s
if canal != "" {
supplierRatio, _ := redis.String(redisCon.Do("HGET", "supp_ratio", canal))
if supplierRatio != "" {
cnDeliveryTime := gjson.Get(supplierRatio, "cn_delivery_time").String()
usDeliveryTime := gjson.Get(supplierRatio, "us_delivery_time").String()
//为了兼容供应商修改的问题
if cnDeliveryTime != "周" && cnDeliveryTime != "天" {
delivery["cn_delivery"] = gjson.Get(supplierRatio, "cn_delivery_time").String()
}else{
delivery["cn_delivery"] = ""
}
if usDeliveryTime != "周" && usDeliveryTime != "天" {
delivery["hk_delivery"] = gjson.Get(supplierRatio, "us_delivery_time").String()
}else{
delivery["hk_delivery"] = ""
}
}
return
}
......
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