Commit c48bfc38 by 杨树贤

Merge branch 'master' into dev

parents d1b6f109 78194c2b
......@@ -162,6 +162,7 @@ type SpuExtra struct {
TransformedWeight float64 `json:"weight"`
Width string `json:"width" bson:"width"`
Length string `json:"length" bson:"length"`
BrandPack string `json:"brand_pack" bson:"brand_pack"`
}
type CustomPrice struct {
......@@ -284,7 +285,8 @@ func InitSkuData(sku string) (data LySku) {
data.Coo = gjson.Get(sku, "coo").String()
data.AbilityLevel = int(gjson.Get(sku,"ability_level").Int())
data.AbilityLevel = int(gjson.Get(sku, "ability_level").Int())
return
}
......
......@@ -137,6 +137,12 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
sku.SpuExtra = ls.GetSpuExtra(sku.SpuId)
}
brandPack := gjson.Get(spu, "brand_pack").String()
if brandPack != "" {
sku.SpuExtra.BrandPack = brandPack
}
//获取供应链标准品牌
//什么是供应链的标准品牌 供应链那边报关的时候要求他们的标准品牌,所以要吧自己的品牌映射上去
//继来那边对接的标准品牌(下单的时候)
......
......@@ -578,6 +578,7 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
}
usSupplierIdList := []int{
1,
6,
19,
7,
......@@ -591,19 +592,19 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
if php2go.InArray(sku.Coo, usLabelList) {
//转换价格
//判断原始人民币有没有价格,没有的话,那就是最终的人民币价格 X 2.25
//判断原始人民币有没有价格,没有的话,那就是最终的人民币价格 X 1.10
var transformedLadderPrice []model.LadderPrice
transformedLadderPrice = sku.LadderPrice
//digikey暂时不处理
if sku.SupplierId != 7 {
for index, price := range sku.LadderPrice {
transformedLadderPrice[index].PriceCn = c.MyRound(c.MulFloat(price.PriceCn, 2.25), 4)
transformedLadderPrice[index].PriceAc = c.MyRound(c.MulFloat(price.PriceAc, 2.25), 4)
transformedLadderPrice[index].PriceCn = c.MyRound(c.MulFloat(price.PriceCn, 1.10), 4)
transformedLadderPrice[index].PriceAc = c.MyRound(c.MulFloat(price.PriceAc, 1.10), 4)
}
}
sku.Tariff = 2.25
sku.TariffFormat = "125%"
sku.Tariff = 1.10
sku.TariffFormat = "10%"
} else {
sku.Coo = ""
}
......
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