最低价显示
This commit is contained in:
@@ -424,7 +424,6 @@ func getActRule(vendorID, actType int) (actRule *tActRuleInfo, err error) {
|
||||
func checkDiscountValidation(vendorIDs []int, actType int, pricePercentage float64) (err error) {
|
||||
pricePercentageMin := int(math.Floor(pricePercentage))
|
||||
pricePercentageMax := int(math.Ceil(pricePercentage))
|
||||
fmt.Println(pricePercentageMin, pricePercentageMax, pricePercentage)
|
||||
errList := errlist.New()
|
||||
for _, vendorID := range vendorIDs {
|
||||
actRule, err2 := getActRule(vendorID, actType)
|
||||
|
||||
@@ -203,7 +203,10 @@ func (*ActStoreSkuMap) TableIndex() [][]string {
|
||||
type ActStoreSku2 struct {
|
||||
MapID int `orm:"column(map_id)"`
|
||||
|
||||
Type int `json:"type"`
|
||||
Type int `json:"type"`
|
||||
DiscountType int `json:"discountType"`
|
||||
DiscountValue1 int `json:"discountValue1"`
|
||||
DiscountValue2 int `json:"discountValue2"`
|
||||
|
||||
ActStoreSku
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
|
||||
@@ -373,7 +373,7 @@ func GetEffectiveActStoreSkuInfo(db *DaoDB, actID int, vendorIDs []int, actType
|
||||
}
|
||||
sql := `
|
||||
SELECT
|
||||
t1.type,
|
||||
t1.type, t1.discount_type, t1.discount_value1, t1.discount_value2,
|
||||
t2.*,
|
||||
t3.actual_act_price, t3.sync_status, t3.vendor_price, t3.vendor_id, t3.trend_type, t3.trend_price
|
||||
FROM act t1
|
||||
|
||||
@@ -260,9 +260,12 @@ type StoreSkuExt struct {
|
||||
JxLockTime *time.Time `orm:"null" json:"jxLockTime,omitempty"`
|
||||
YbLockTime *time.Time `orm:"null" json:"ybLockTime,omitempty"`
|
||||
|
||||
ActPrice int `json:"actPrice"`
|
||||
ActID int `orm:"column(act_id)" json:"actID"`
|
||||
ActType int `orm:"column(act_type)" json:"actType"`
|
||||
ActPrice int `json:"actPrice"`
|
||||
ActID int `orm:"column(act_id)" json:"actID"`
|
||||
ActType int `orm:"column(act_type)" json:"actType"`
|
||||
DiscountType int `json:"discountType"`
|
||||
DiscountValue1 int `json:"discountValue1"`
|
||||
DiscountValue2 int `json:"discountValue2"`
|
||||
|
||||
EarningPrice int `json:"earningPrice"`
|
||||
EarningActID int `orm:"column(earning_act_id)" json:"earningActID"`
|
||||
@@ -1370,6 +1373,9 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
|
||||
v.EarningPrice = int(jxutils.CaculateSkuEarningPrice(int64(v.BindPrice), int64(v.ActPrice), skuName.PayPercentage))
|
||||
v.TrendType = actStoreSku.TrendType
|
||||
v.TrendPrice = actStoreSku.TrendPrice
|
||||
v.DiscountType = actStoreSku.DiscountType
|
||||
v.DiscountValue1 = actStoreSku.DiscountValue1
|
||||
v.DiscountValue2 = actStoreSku.DiscountValue2
|
||||
}
|
||||
if actStoreSku := actStoreSkuMap4EarningPrice.GetActStoreSku(skuName.StoreID, v.SkuID, -1); actStoreSku != nil {
|
||||
v.EarningPrice = int(actStoreSku.EarningPrice)
|
||||
|
||||
Reference in New Issue
Block a user