- fk
This commit is contained in:
@@ -239,7 +239,11 @@ func getSkuSalePrice2(product *ebaiapi.OrderProductInfo) (salePrice int) {
|
||||
if product.ProductSubsidy != nil {
|
||||
for _, v := range product.ProductSubsidy.DiscountDetail {
|
||||
if skuActTypeMap[v.Type] == 1 {
|
||||
salePrice -= (v.BaiduRate + v.ShopRate) / product.Number // 饿百同一SKU的优惠与非优惠没有拆开,平均摊销处理
|
||||
skuCount := product.ProductAmount
|
||||
if skuCount == 0 {
|
||||
skuCount = product.Number
|
||||
}
|
||||
salePrice -= (v.BaiduRate + v.ShopRate) / skuCount // 饿百同一SKU的优惠与非优惠没有拆开,平均摊销处理
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasks
|
||||
_, err = dao.UpdateEntity(db, storeSkuBind, updateFields...)
|
||||
}
|
||||
} else if isErrModifyPrice(err) {
|
||||
err = partner.NewErrorCode(err.Error(), partner.ErrCodeChangePriceFailed, model.VendorIDEBAI)
|
||||
err = partner.NewErrorCode(err.Error(), partner.ErrCodeChangePriceFailed, model.VendorIDMTWM)
|
||||
}
|
||||
return nil, err
|
||||
}, skus)
|
||||
|
||||
Reference in New Issue
Block a user