This commit is contained in:
msj
2026-09-22 10:39:41 +08:00
parent 2d9ddd051a
commit dccc0b6092
3 changed files with 7 additions and 4 deletions
+4 -2
View File
@@ -28,12 +28,14 @@ def delete_student_dao(stu_id,db):
def update_student_dao(stu_id,update_data,db):
try:
rows = db.query( Student_Model ).filter( Student_Model.stu_id == stu_id,Student_Model.delete_status == 0).update( update_data )
rows = (db.query( Student_Model )
.filter( Student_Model.stu_id == stu_id,Student_Model.delete_status == 0)
.update( update_data ))
db.commit()
except:
db.rollback()
return False
else:
db.commit()
return rows
def get_student_dao(stu_id:Optional[int]