earningprice改名
This commit is contained in:
@@ -670,7 +670,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
|||||||
saleInfo.VendorPrice += v.VendorPrice * int64(v.Count)
|
saleInfo.VendorPrice += v.VendorPrice * int64(v.Count)
|
||||||
saleInfo.SalePrice += v.SalePrice * int64(v.Count)
|
saleInfo.SalePrice += v.SalePrice * int64(v.Count)
|
||||||
// saleInfo.EarningPrice += v.EarningPrice * int64(v.Count)
|
// saleInfo.EarningPrice += v.EarningPrice * int64(v.Count)
|
||||||
saleInfo.EarningPrice = v.EarningPrice2
|
saleInfo.EarningPrice = v.NewEarningPrice
|
||||||
|
|
||||||
universalOrderID := jxutils.ComposeUniversalOrderID(v.VendorOrderID, v.VendorID)
|
universalOrderID := jxutils.ComposeUniversalOrderID(v.VendorOrderID, v.VendorID)
|
||||||
if orderMap[universalOrderID] == nil {
|
if orderMap[universalOrderID] == nil {
|
||||||
@@ -747,7 +747,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
|||||||
saleInfo.SalePrice += v.SalePrice
|
saleInfo.SalePrice += v.SalePrice
|
||||||
// saleInfo.EarningPrice += v.EarningPrice
|
// saleInfo.EarningPrice += v.EarningPrice
|
||||||
saleInfo.Count++
|
saleInfo.Count++
|
||||||
saleInfo.EarningPrice = v.EarningPrice2
|
saleInfo.EarningPrice = v.NewEarningPrice
|
||||||
}
|
}
|
||||||
for _, v := range saleInfoMap {
|
for _, v := range saleInfoMap {
|
||||||
saleInfoList = append(saleInfoList, v)
|
saleInfoList = append(saleInfoList, v)
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ func (c *BaseScheduler) CreateWaybillOnProviders(ctx *jxcontext.Context, order *
|
|||||||
stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "")
|
stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "")
|
||||||
if len(stores) > 0 {
|
if len(stores) > 0 {
|
||||||
if stores[0].PayPercentage <= 50 {
|
if stores[0].PayPercentage <= 50 {
|
||||||
order.EarningPrice2 = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - stores[0].PayPercentage/2)) / 10000
|
order.NewEarningPrice = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - stores[0].PayPercentage/2)) / 10000
|
||||||
dao.UpdateEntity(dao.GetDB(), order, "EarningPrice2")
|
dao.UpdateEntity(dao.GetDB(), order, "NewEarningPrice")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("CreateWaybillOnProviders orderID:%s userName:%s vendorID:%d bill:%v", order.VendorOrderID, userName, courierVendorID, bill)
|
globals.SugarLogger.Debugf("CreateWaybillOnProviders orderID:%s userName:%s vendorID:%d bill:%v", order.VendorOrderID, userName, courierVendorID, bill)
|
||||||
|
|||||||
@@ -542,9 +542,9 @@ func RefreshOrderSkuRelated(order *model.GoodsOrder) *model.GoodsOrder {
|
|||||||
|
|
||||||
func RefreshOrderEarningPrice2(order *model.GoodsOrder, payPercentage int) *model.GoodsOrder {
|
func RefreshOrderEarningPrice2(order *model.GoodsOrder, payPercentage int) *model.GoodsOrder {
|
||||||
if payPercentage <= 50 {
|
if payPercentage <= 50 {
|
||||||
order.EarningPrice2 = order.TotalShopMoney * int64((100 - payPercentage/2)) / 10000
|
order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage/2)) / 10000
|
||||||
} else {
|
} else {
|
||||||
order.EarningPrice2 = order.EarningPrice
|
order.NewEarningPrice = order.EarningPrice
|
||||||
}
|
}
|
||||||
return order
|
return order
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ type OrderSkuWithActualPayPrice struct {
|
|||||||
Status int `json:"status"` // 参见OrderStatus*相关的常量定义
|
Status int `json:"status"` // 参见OrderStatus*相关的常量定义
|
||||||
|
|
||||||
PayPercentage int `json:"payPercentage"`
|
PayPercentage int `json:"payPercentage"`
|
||||||
EarningPrice2 int64 `json:"earningPrice2"`
|
NewEarningPrice int64 `json:"newEarningPrice"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type tGoodsAndOrder struct {
|
type tGoodsAndOrder struct {
|
||||||
@@ -359,7 +359,7 @@ func GetStoreOrderSkuList(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAt
|
|||||||
// order_finished_at
|
// order_finished_at
|
||||||
sql := `
|
sql := `
|
||||||
SELECT t1.*,
|
SELECT t1.*,
|
||||||
IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id) store_id, t2.status, t2.actual_pay_price, t2.distance_freight_money, t2.waybill_tip_money, t2.earning_price2,
|
IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id) store_id, t2.status, t2.actual_pay_price, t2.distance_freight_money, t2.waybill_tip_money, t2.new_earning_price,
|
||||||
t3.pay_percentage
|
t3.pay_percentage
|
||||||
FROM order_sku t1
|
FROM order_sku t1
|
||||||
JOIN goods_order t2 ON t2.vendor_order_id = t1.vendor_order_id AND t2.vendor_id = t1.vendor_id
|
JOIN goods_order t2 ON t2.vendor_order_id = t1.vendor_order_id AND t2.vendor_id = t1.vendor_id
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ type GoodsOrder struct {
|
|||||||
DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值)
|
DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值)
|
||||||
WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费
|
WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费
|
||||||
EarningPrice int64 `json:"earningPrice"` // 结算给门店老板的钱(未扣除可能的三方配送费)
|
EarningPrice int64 `json:"earningPrice"` // 结算给门店老板的钱(未扣除可能的三方配送费)
|
||||||
EarningPrice2 int64 `json:"earningPrice2"` // 结算给门店老板的钱(未扣除可能的三方配送费)(新规则)
|
NewEarningPrice int64 `json:"newEarningPrice"` // 结算给门店老板的钱(未扣除可能的三方配送费)(新规则)
|
||||||
Weight int `json:"weight"` // 单位为克
|
Weight int `json:"weight"` // 单位为克
|
||||||
VendorUserID string `orm:"column(vendor_user_id);size(48)" json:"vendorUserID"`
|
VendorUserID string `orm:"column(vendor_user_id);size(48)" json:"vendorUserID"`
|
||||||
UserID string `orm:"column(user_id);size(48);index" json:"userID"`
|
UserID string `orm:"column(user_id);size(48);index" json:"userID"`
|
||||||
|
|||||||
Reference in New Issue
Block a user