Commit afc01282 by 杨树贤

成本价输出

parent 8776b963
......@@ -21,11 +21,12 @@ type LadderPrice struct {
}
type OriginPrice struct {
Purchases int64 `json:"purchases"` //购买数量
PriceUs float64 `json:"price_us"` //数量对应的英文价格
PriceCn float64 `json:"price_cn"` //数量对应的中文价格
PriceAc float64 `json:"price_ac,omitempty"`
CostPrice float64 `json:"cost_price"`
Purchases int64 `json:"purchases"` //购买数量
PriceUs float64 `json:"price_us"` //数量对应的英文价格
PriceCn float64 `json:"price_cn"` //数量对应的中文价格
PriceAc float64 `json:"price_ac,omitempty"`
CostPrice float64 `json:"cost_price"`
CostPriceUs float64 `json:"cost_price_us"`
}
type DatabasePrice struct {
......
......@@ -102,7 +102,8 @@ type LySku struct {
OnwayStock int `json:"onway_stock"`
CompareRatio float64 `json:"compare_ratio"`
//兼容自营下单的字段,取成本价的第一个阶梯的人民币
Cost float64 `json:"cost"`
Cost float64 `json:"cost"`
CostUs float64 `json:"cost_us"`
}
type DiscountRatio struct {
......
......@@ -357,6 +357,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
Purchases: price.Purchases,
PriceCn: priceCnTax,
PriceUs: price.PriceUs,
CostPrice: price.CostPrice,
})
}
......
......@@ -956,6 +956,7 @@ func (ps *PriceService) GetComparePrice(sku model.LySku) model.LySku {
func (ps *PriceService) GetCostForZiying(sku model.LySku) model.LySku {
if len(sku.OriginalPrice) != 0 {
sku.Cost = sku.OriginalPrice[0].CostPrice
sku.CostUs = sku.OriginalPrice[0].CostPriceUs
}
return sku
......
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