Commit 60b609e8 by 杨树贤

Merge branch 'ysx-魔方价格体系修改-20250306' into dev

parents b367efec 830b728c
Showing with 21 additions and 1 deletions
......@@ -169,13 +169,33 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
sku.Moq = purchases
}
}
//这里又有一个判断,如果是非猎芯的,目前只有爱智,通过org_id来判断,如果是爱智,不需要走价格体系
//1是猎芯,3是爱智
switch sku.OrgId {
//case为0是为了兼容价格体系之前的价格
case 0:
case 1:
//如果是寄售的,也不走价格体系
if sku.Source != 12 {
//这里还有个特殊判断,要兼容华云改价格体系之前的老数据
//判断组织是3并且阶梯价数量为2的就是老数据
if sku.OrgId == 3 && len(sku.LadderPrice) == 2 {
priceService := PriceService{}
sku.LadderPrice = priceService.GetIEdgePrice(sku.LadderPrice)
} else {
//这里猎芯和华云都是走同一套的价格体系了
//获取系数和价格
sku = ls.GetCoefficientAndPrice(sku)
//获取自定义价格后的阶梯价
customPriceService := CustomPrice{}
sku.CustomPriceList, _ = customPriceService.getCustomPriceList(sku)
//这里还要针对华云的阶梯价进行一次转换,因为要兼容目前华云的试用方式
if sku.OrgId == 3 {
sku.LadderPrice = customPriceService.transformIEdgeLadderPrice(sku)
}
}
}
case 3:
//如果是寄售的,也不走价格体系
if sku.Source != 12 {
......
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