aa
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
beego "github.com/astaxie/beego/server/web"
|
||||||
"image"
|
"image"
|
||||||
"image/png"
|
"image/png"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
@@ -503,17 +504,18 @@ func GetVendorName(vendorID int) (vendorName string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func CaculateSkuEarningPrice(shopPrice, salePrice int64, storePayPercentage int) (earningPrice int64) {
|
func CaculateSkuEarningPrice(shopPrice, salePrice int64, storePayPercentage int) (earningPrice int64) {
|
||||||
//TODO 2021-07-05 菜市和果园一样,取低的
|
//TODO 2021-07-05 16:50菜市和果园一样,取低的
|
||||||
//if beego.BConfig.RunMode == "jxgy" {
|
//TODO 2021-07-05 18:48 还是改回来
|
||||||
|
if beego.BConfig.RunMode == "jxgy" {
|
||||||
earningPrice = salePrice
|
earningPrice = salePrice
|
||||||
if salePrice != 0 {
|
if salePrice != 0 {
|
||||||
if shopPrice > 0 && shopPrice < earningPrice {
|
if shopPrice > 0 && shopPrice < earningPrice {
|
||||||
earningPrice = shopPrice
|
earningPrice = shopPrice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//} else {
|
} else {
|
||||||
// earningPrice = shopPrice
|
earningPrice = shopPrice
|
||||||
//}
|
}
|
||||||
storePayPercentage = ConstrainPayPercentage(storePayPercentage)
|
storePayPercentage = ConstrainPayPercentage(storePayPercentage)
|
||||||
if storePayPercentage <= 0 {
|
if storePayPercentage <= 0 {
|
||||||
storePayPercentage = model.DefaultEarningPricePercentage
|
storePayPercentage = model.DefaultEarningPricePercentage
|
||||||
|
|||||||
Reference in New Issue
Block a user