feat: 完善商品筛选、发布配置与优质号主流程
This commit is contained in:
@@ -131,6 +131,15 @@ func (r *Repository) applyAdminListFilters(db *gorm.DB, query AdminListQuery) *g
|
||||
if query.ReviewStatus != "" {
|
||||
db = db.Where("l.review_status = ?", query.ReviewStatus)
|
||||
}
|
||||
if query.CompensationPlan != "" {
|
||||
db = db.Where("l.compensation_plan = ?", query.CompensationPlan)
|
||||
}
|
||||
switch query.Zone {
|
||||
case "premium":
|
||||
db = db.Where("l.is_premium = ?", true)
|
||||
case "normal":
|
||||
db = db.Where("l.is_premium = ?", false)
|
||||
}
|
||||
if query.MinCoin != nil {
|
||||
db = db.Where(
|
||||
"EXISTS (SELECT 1 FROM game_accounts AS coin_account WHERE coin_account.id = l.account_id AND coin_account.haf_coin_amount >= ?)",
|
||||
|
||||
Reference in New Issue
Block a user