果园订单利润修改
This commit is contained in:
@@ -6,6 +6,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/astaxie/beego"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/authz"
|
"git.rosy.net.cn/jx-callback/business/authz"
|
||||||
@@ -1446,11 +1448,19 @@ func OrderProfitWarning(order *model.GoodsOrder) {
|
|||||||
storeDetail, err := dao.GetStoreDetail(db, storeID, order.VendorID)
|
storeDetail, err := dao.GetStoreDetail(db, storeID, order.VendorID)
|
||||||
if storeDetail != nil && err == nil {
|
if storeDetail != nil && err == nil {
|
||||||
payPercentage := storeDetail.PayPercentage
|
payPercentage := storeDetail.PayPercentage
|
||||||
|
if beego.BConfig.RunMode == "jxgy" {
|
||||||
|
if payPercentage >= 50 {
|
||||||
|
profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney-order.EarningPrice)) / 100
|
||||||
|
} else {
|
||||||
|
profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney*int64(payPercentage)/200)) / 100
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if payPercentage >= 50 {
|
if payPercentage >= 50 {
|
||||||
profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney-order.ShopPrice)) / 100
|
profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney-order.ShopPrice)) / 100
|
||||||
} else {
|
} else {
|
||||||
profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney*int64(payPercentage)/200)) / 100
|
profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney*int64(payPercentage)/200)) / 100
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if profit < 0 {
|
if profit < 0 {
|
||||||
operatorPhone, operatorName := getOrderOperatorInfo(order, storeDetail)
|
operatorPhone, operatorName := getOrderOperatorInfo(order, storeDetail)
|
||||||
operatorRole := getOrderOperatorRoleInfo(order, storeDetail)
|
operatorRole := getOrderOperatorRoleInfo(order, storeDetail)
|
||||||
|
|||||||
Reference in New Issue
Block a user