Adding admin operations to the balance
This commit is contained in:
@@ -2,6 +2,7 @@ from sqlalchemy import func, select
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from database.models import Key, Payment, User
|
||||
from core.constants import PAYMENT_SYSTEMS_EXCLUDED
|
||||
|
||||
|
||||
async def get_hot_leads(session: AsyncSession):
|
||||
@@ -16,7 +17,7 @@ async def get_hot_leads(session: AsyncSession):
|
||||
.where(User.trial == 1)
|
||||
.where(Payment.amount > 0)
|
||||
.where(Payment.status == "success")
|
||||
.where(Payment.payment_system.notin_(["referral", "coupon", "cashback"]))
|
||||
.where(Payment.payment_system.notin_(PAYMENT_SYSTEMS_EXCLUDED))
|
||||
.where(~Payment.tg_id.in_(sub_active))
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user