diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index b23ac4788..d17658f39 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -221,7 +221,7 @@ func (c *OrderManager) SaveOrder(order *model.GoodsOrder, isAdjust bool, db *dao shop_price, vendor_price, sale_price, weight, sku_type, promotion_type, order_created_at) VALUES` params := []interface{}{} for _, sku := range order.Skus { - sql += "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)," + sql += "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)," // 有时不是通过京西平台建立的SKU,不范围要超过 skuID := 0 if sku.SkuID < math.MaxInt32 { diff --git a/business/partner/purchase/ebai/order.go b/business/partner/purchase/ebai/order.go index 02c678008..ac7936c00 100644 --- a/business/partner/purchase/ebai/order.go +++ b/business/partner/purchase/ebai/order.go @@ -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的优惠与非优惠没有拆开,平均摊销处理 } } } diff --git a/business/partner/purchase/mtwm/store_sku.go b/business/partner/purchase/mtwm/store_sku.go index c026dad76..e7235b9d9 100644 --- a/business/partner/purchase/mtwm/store_sku.go +++ b/business/partner/purchase/mtwm/store_sku.go @@ -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)