fix(tenant): 收紧双站后台边界并补齐货架管理
This commit is contained in:
@@ -166,8 +166,10 @@ func (r *Repository) AdminLedger(ctx context.Context, query AdminLedgerQuery) (*
|
||||
|
||||
countDB := r.db.WithContext(ctx).Model(&model.WalletLedger{})
|
||||
if tenantID > 0 {
|
||||
db = db.Where("wl.tenant_id = ?", tenantID)
|
||||
countDB = countDB.Where("tenant_id = ?", tenantID)
|
||||
db = db.Where("wl.tenant_id = ?", tenantID).
|
||||
Where("(wl.distribution_site_id = 0 OR wl.distribution_site_id IS NULL)")
|
||||
countDB = countDB.Where("tenant_id = ?", tenantID).
|
||||
Where("(distribution_site_id = 0 OR distribution_site_id IS NULL)")
|
||||
}
|
||||
if query.UserID > 0 {
|
||||
db = db.Where("wl.user_id = ?", query.UserID)
|
||||
|
||||
Reference in New Issue
Block a user