diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 39c6b15d3..9f6b8a538 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -96,8 +96,7 @@ func (c *OrderManager) GetOrderSkuInfo(ctx *jxcontext.Context, vendorOrderID str t1.sku_name, IF(t1.shop_price = 0, t1.sale_price, t1.shop_price) shop_price, t1.sale_price, - t1.earning_price, - CAST(IF(t1.earning_price <> 0, t1.earning_price, IF(t1.shop_price <> 0 && t1.shop_price < t1.sale_price, t1.shop_price, t1.sale_price) * IF(t5.pay_percentage > 0, t5.pay_percentage, ?) / 100) AS SIGNED) real_earning_price, + CAST(IF(t1.earning_price <> 0, t1.earning_price, IF(t1.shop_price <> 0 && t1.shop_price < t1.sale_price, t1.shop_price, t1.sale_price) * IF(t5.pay_percentage > 0, t5.pay_percentage, ?) / 100) AS SIGNED) earning_price, t1.weight, t1.sku_type, t1.promotion_type, diff --git a/business/model/api.go b/business/model/api.go index cd453caf1..eb3580556 100644 --- a/business/model/api.go +++ b/business/model/api.go @@ -45,10 +45,10 @@ type GoodsOrderExt struct { type OrderSkuExt struct { OrderSku - NameID int `orm:"column(name_id)" json:"nameID"` - FullSkuName string `json:"fullSkuName"` - Image string `json:"image"` - RealEarningPrice int64 `json:"realEarningPrice"` // 实际单品结算给门店老板钱 + NameID int `orm:"column(name_id)" json:"nameID"` + FullSkuName string `json:"fullSkuName"` + Image string `json:"image"` + // RealEarningPrice int64 `json:"realEarningPrice"` // 实际单品结算给门店老板钱 } type GoodsOrderCountInfo struct { diff --git a/business/model/dao/store_sku.go b/business/model/dao/store_sku.go index 4422edfa9..ce20a7fbb 100644 --- a/business/model/dao/store_sku.go +++ b/business/model/dao/store_sku.go @@ -176,7 +176,7 @@ type StoreSkuExt struct { EarningPrice int `json:"earningPrice"` EarningActID int `orm:"column(earning_act_id)" json:"earningActID"` - RealEarningPrice int `json:"realEarningPrice"` + // RealEarningPrice int `json:"realEarningPrice"` StatusSaleBegin int16 `json:"statusSaleBegin"` //商品可售时间范围 StatusSaleEnd int16 `json:"statusSaleEnd"` @@ -1195,12 +1195,14 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI if actStoreSku := actStoreSkuMap4EarningPrice.GetActStoreSku(skuName.StoreID, v.SkuID, -1); actStoreSku != nil { v.EarningPrice = int(actStoreSku.EarningPrice) v.EarningActID = actStoreSku.ActID + } else { + v.EarningPrice = int(jxutils.CaculateSkuEarningPrice(int64(v.BindPrice), int64(v.BindPrice), skuName.PayPercentage)) } - v.RealEarningPrice = v.EarningPrice - if v.RealEarningPrice == 0 { - v.RealEarningPrice = int(jxutils.CaculateSkuEarningPrice(int64(v.BindPrice), int64(v.BindPrice), skuName.PayPercentage)) - } + // v.RealEarningPrice = v.EarningPrice + // if v.RealEarningPrice == 0 { + // v.RealEarningPrice = int(jxutils.CaculateSkuEarningPrice(int64(v.BindPrice), int64(v.BindPrice), skuName.PayPercentage)) + // } } } else { skuName.UnitPrice = skuName.Price diff --git a/business/model/order.go b/business/model/order.go index 96624d07f..d330ce167 100644 --- a/business/model/order.go +++ b/business/model/order.go @@ -133,7 +133,7 @@ type OrderSku struct { ID int64 `orm:"column(id)" json:"-"` VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"` VendorID int `orm:"column(vendor_id)" json:"vendorID"` - StoreSubID int `orm:"column(store_sub_id)" json:"storeSubID"` // 当前这个字段被当成结算活动ID用 + StoreSubID int `orm:"column(store_sub_id)" json:"storeSubID"` // EarningActID,当前这个字段被当成结算活动ID用 StoreSubName string `orm:"size(64)" json:"storeSubName"` // 当前这个字段被用作vendorActType Count int `json:"count"` VendorSkuID string `orm:"column(vendor_sku_id);size(48)" json:"vendorSkuID"`