Merge remote-tracking branch 'origin/conding' into conding

This commit is contained in:
test1
2026-09-22 16:49:05 +08:00
2 changed files with 0 additions and 12 deletions
-10
View File
@@ -38,15 +38,6 @@ def delete_student_dao(stu_id, db):
def update_student_dao(stu_id, update_data, db):
if not update_data:
return 0
id_card = update_data.get('id_card')
if id_card:
conflict = (db.query(Student_Model)
.filter(Student_Model.id_card == id_card,
Student_Model.stu_id != stu_id,
Student_Model.delete_status == 0)
.first())
if conflict:
return 'conflict'
try:
rows = (db.query(Student_Model)
.filter(Student_Model.stu_id == stu_id,
@@ -59,7 +50,6 @@ def update_student_dao(stu_id, update_data, db):
except Exception:
db.rollback()
return 'error'
return rows
def get_student_dao(stu_id:Optional[int]