|
@@ -12,7 +12,7 @@ func GetPricingStrategy(ctx context.Context, fansLow int64, fansUp int64, feeFor
|
|
|
db := GetReadDB(ctx)
|
|
|
var PricingStrategys []gorm_model.InfoPricingStrategy
|
|
|
whereStr := fmt.Sprintf("fee_form = %d and platform = %d and fans_low <= %d and fans_up > %d", feeForm, platForm, fansLow, fansLow)
|
|
|
- orStr := fmt.Sprintf("fee_form = %d and platform = %d and fans_low <= %d and fans_up >= %d", feeForm, platForm, fansUp, fansUp)
|
|
|
+ orStr := fmt.Sprintf("fee_form = %d and platform = %d and fans_low < %d and fans_up >= %d", feeForm, platForm, fansUp, fansUp)
|
|
|
orStr1 := fmt.Sprintf("fee_form = %d and platform = %d and fans_low >= %d and fans_up <= %d", feeForm, platForm, fansLow, fansUp)
|
|
|
orStr2 := fmt.Sprintf("fee_form = %d and platform = %d and fans_low <= %d and fans_up >= %d", feeForm, platForm, fansLow, fansUp)
|
|
|
err := db.Model(gorm_model.InfoPricingStrategy{}).Where(whereStr).Or(orStr).Or(orStr1).Or(orStr2).Scan(&PricingStrategys).Error
|