Commit afc01282 by 杨树贤

成本价输出

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