Commit eec49b35 by 杨树贤

新客家

parent 9072e86e
......@@ -17,7 +17,7 @@ type RequestParams struct {
// 用户权限相关参数
Power PowerParams
//是否展示新客价格
ShowNewCustomerPrice string
NewCustomer string
}
// PowerParams 用户权限参数
......@@ -51,5 +51,6 @@ func ExtractRequestParams(ctx *gin.Context) RequestParams {
Invoice: ctx.Request.FormValue("power[invoice]"),
SpecialInvoice: ctx.Request.FormValue("power[special_invoice]"),
},
NewCustomer: ctx.Request.FormValue("new_customer"),
}
}
......@@ -68,8 +68,7 @@ func (ls *LyService) LyGoodsDetail(ctx context.Context, params RequestParams, go
//是否展示spu额外信息
showSpuExtra := params.ShowSpuExtra
//是否展示新客价格
showNewCustomerPrice := params.ShowNewCustomerPrice
newCustomer := params.NewCustomer
//批量获取商品详情
skuArr := gredis.Hmget("default_r", "sku", goodsIds)
//为了性能着想,这边也先去批量获取spu的信息
......@@ -211,9 +210,8 @@ func (ls *LyService) LyGoodsDetail(ctx context.Context, params RequestParams, go
//处理活动
sku.AcType = 0
sku.AllowCoupon = 1
//这里获取活动价格和活动类型(折扣打折活动)
sku = ls.GetActivity(sku)
sku = ls.GetActivity(sku, newCustomer)
priceService := PriceService{}
//这里又有一个判断,如果是非猎芯的,目前只有爱智,通过org_id来判断
......
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