1
This commit is contained in:
@@ -28,7 +28,16 @@ async def list_user_oauth_apps(
|
||||
if app_id is not None:
|
||||
query = query.where(UserOAuthApp.app_id.like(f"%{app_id}%"))
|
||||
|
||||
total_result = await db.execute(select(func.count(UserOAuthApp.id)).where(UserOAuthApp.deleted_at.is_(None)))
|
||||
count_query = select(func.count(UserOAuthApp.id)).where(UserOAuthApp.deleted_at.is_(None))
|
||||
if open_type is not None:
|
||||
count_query = count_query.where(UserOAuthApp.open_type == open_type)
|
||||
if status is not None:
|
||||
count_query = count_query.where(UserOAuthApp.status == status)
|
||||
if create_by is not None:
|
||||
count_query = count_query.where(UserOAuthApp.create_by == create_by)
|
||||
if app_id is not None:
|
||||
count_query = count_query.where(UserOAuthApp.app_id.like(f"%{app_id}%"))
|
||||
total_result = await db.execute(count_query)
|
||||
total = total_result.scalar() or 0
|
||||
|
||||
result = await db.execute(query.offset((page - 1) * page_size).limit(page_size))
|
||||
|
||||
Reference in New Issue
Block a user