Commit cf2de43c by huangchengyi

添加联营倍数

parent a8e0a668
Showing with 10 additions and 0 deletions
...@@ -115,6 +115,15 @@ func (qs *ParityService) GetParity(ctx *gin.Context) (results model.LyResponse) ...@@ -115,6 +115,15 @@ func (qs *ParityService) GetParity(ctx *gin.Context) (results model.LyResponse)
if tprice == 0 { //不符合梯度价跳过比价 if tprice == 0 { //不符合梯度价跳过比价
continue; continue;
} }
Multiple := 0 //联营倍数
if v.SupplierName != "猎芯自营" {
//联营倍数
Multiple = v.Mpq
if v.Mpq > v.Moq {
Multiple = v.Moq
}
}
//转换价格 //转换价格
dullGoodsData,err := transformer.MetGoodsInfo(ctx,model.DullGoodsData{ dullGoodsData,err := transformer.MetGoodsInfo(ctx,model.DullGoodsData{
ApiGoods:v, ApiGoods:v,
...@@ -122,6 +131,7 @@ func (qs *ParityService) GetParity(ctx *gin.Context) (results model.LyResponse) ...@@ -122,6 +131,7 @@ func (qs *ParityService) GetParity(ctx *gin.Context) (results model.LyResponse)
BrandUrl: BrandUrl, BrandUrl: BrandUrl,
Attrs: attrs[v.GoodsId], Attrs: attrs[v.GoodsId],
Tprice: tprice, //对应梯度价格 Tprice: tprice, //对应梯度价格
Multiple:Multiple,
}) })
if err != nil { if err != nil {
......
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