v1.2版本更新发布
This commit is contained in:
@@ -120,6 +120,13 @@ class StudentModel:
|
||||
row['rank'] = i + 1
|
||||
return results
|
||||
|
||||
@staticmethod
|
||||
async def get_total_count() -> int:
|
||||
"""获取活跃学生总数"""
|
||||
sql = "SELECT COUNT(*) as total FROM students WHERE status = 1"
|
||||
result = await execute_one(sql)
|
||||
return result["total"] if result else 0
|
||||
|
||||
@staticmethod
|
||||
async def batch_create(students_data: List[Dict], initial_points: int = 60) -> List[Dict]:
|
||||
"""批量创建学生"""
|
||||
|
||||
Reference in New Issue
Block a user