v2.2更新

This commit is contained in:
2026-05-28 15:38:32 +08:00
parent f84c9d3efb
commit ca53fdc349
38 changed files with 688 additions and 686 deletions

View File

@@ -209,6 +209,7 @@ class ConductModel:
student_id: int = None,
start_date: str = None,
end_date: str = None,
related_type: str = None,
page: int = 1,
page_size: int = 20
) -> Dict[str, Any]:
@@ -217,6 +218,8 @@ class ConductModel:
start_date = None
if end_date == "":
end_date = None
if related_type == "":
related_type = None
conditions = ["cr.is_revoked = 0"]
params = []
@@ -230,6 +233,9 @@ class ConductModel:
if end_date:
conditions.append("cr.created_at <= %s")
params.append(end_date + ' 23:59:59')
if related_type:
conditions.append("cr.related_type = %s")
params.append(related_type)
where_clause = " AND ".join(conditions)