aa
This commit is contained in:
@@ -545,35 +545,25 @@ func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db *dao.
|
||||
//TODO 京东美团的订单,做活动的商品之前就会拆分出来,所以只做更新,饿百暂时不管, 2020-05-07
|
||||
//TODO 不根据商品是否拆分,直接根据该商品做了活动,并且他的vendorPrice 和 salePrice 相等,就按新规则结算, 2020-05-11
|
||||
//TODO 现在不判断商品做没做活动,只要vendorPrice和salePrice不等,就默认为做了活动,不做活动的商品就按新规则结算,2020-05-18
|
||||
if order.VendorID == model.VendorIDJD || order.VendorID == model.VendorIDMTWM {
|
||||
for _, v := range orderSkus {
|
||||
if v.EarningPrice > 0 {
|
||||
// var storeID int
|
||||
// if order.StoreID == 0 {
|
||||
// storeID = order.JxStoreID
|
||||
// } else {
|
||||
// storeID = order.StoreID
|
||||
// }
|
||||
// result, err := dao.GetEffectiveActStoreSkuInfo2(db, 0, []int{order.VendorID}, []int{model.ActSkuSecKill, model.ActSkuDirectDown}, []int{storeID}, []int{v.SkuID}, order.OrderCreatedAt, order.OrderCreatedAt)
|
||||
// if (len(result) > 0 && err == nil) || v.IsVendorAct == model.YES {
|
||||
if v.VendorPrice == v.SalePrice {
|
||||
var earningPrice = 0
|
||||
if v.ShopPrice < v.SalePrice {
|
||||
if v.ShopPrice == 0 {
|
||||
earningPrice = int(utils.Float64TwoInt64(math.Round(utils.Int2Float64(int(v.SalePrice)) * utils.Int2Float64(storePayPercentage) / 100)))
|
||||
} else {
|
||||
earningPrice = int(utils.Float64TwoInt64(math.Round(utils.Int2Float64(int(v.ShopPrice)) * utils.Int2Float64(storePayPercentage) / 100)))
|
||||
}
|
||||
} else {
|
||||
earningPrice = int(utils.Float64TwoInt64(math.Round(utils.Int2Float64(int(v.SalePrice)) * utils.Int2Float64(storePayPercentage) / 100)))
|
||||
}
|
||||
v.EarningPrice = int64(earningPrice)
|
||||
// v.StoreSubID = 0
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
// if order.VendorID == model.VendorIDJD || order.VendorID == model.VendorIDMTWM {
|
||||
// for _, v := range orderSkus {
|
||||
// if v.EarningPrice > 0 {
|
||||
// if v.VendorPrice == v.SalePrice {
|
||||
// var earningPrice = 0
|
||||
// if v.ShopPrice < v.SalePrice {
|
||||
// if v.ShopPrice == 0 {
|
||||
// earningPrice = int(utils.Float64TwoInt64(math.Round(utils.Int2Float64(int(v.SalePrice)) * utils.Int2Float64(storePayPercentage) / 100)))
|
||||
// } else {
|
||||
// earningPrice = int(utils.Float64TwoInt64(math.Round(utils.Int2Float64(int(v.ShopPrice)) * utils.Int2Float64(storePayPercentage) / 100)))
|
||||
// }
|
||||
// } else {
|
||||
// earningPrice = int(utils.Float64TwoInt64(math.Round(utils.Int2Float64(int(v.SalePrice)) * utils.Int2Float64(storePayPercentage) / 100)))
|
||||
// }
|
||||
// v.EarningPrice = int64(earningPrice)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ func getOrderDetailBrief(order *model.GoodsOrder) (brief string) {
|
||||
if order.EarningType == model.EarningTypePoints {
|
||||
price = order.ActualPayPrice
|
||||
} else {
|
||||
price = order.ShopPrice
|
||||
price = order.EarningPrice
|
||||
}
|
||||
}
|
||||
sb.WriteString(jxutils.IntPrice2StandardString(price))
|
||||
|
||||
@@ -190,7 +190,7 @@ func getOrderDetailBrief(order *model.GoodsOrder) (brief string) {
|
||||
if order.EarningType == model.EarningTypePoints {
|
||||
price = order.ActualPayPrice
|
||||
} else {
|
||||
price = order.ShopPrice
|
||||
price = order.EarningPrice
|
||||
}
|
||||
}
|
||||
sb.WriteString(jxutils.IntPrice2StandardString(price))
|
||||
|
||||
Reference in New Issue
Block a user