This commit is contained in:
he
2026-09-21 20:03:17 +08:00
parent da7fabc20e
commit 5ea7a73295
3 changed files with 47 additions and 7 deletions
+27 -1
View File
@@ -21,4 +21,30 @@ def add_grade_dao(g,db):
return o1
except Exception:
db.rollback()
return None
return None
def update_grade_dao(score_id:int, update_data, db):
try:
rows = db.query(WlScore).filter(
WlScore.stu_id == score_id,
WlScore.delete_status == 0
).update(update_data)
except:
db.rollback()
return False
else:
db.commit()
return rows
def delete_grade_dao(stu_id:int,db):
try:
rows = db.query(WlScore).filter(
WlScore.stu_id == stu_id,
WlScore.delete_status == 0
).update({'delete_status':1})
except:
db.rollback()
return False
else:
db.commit()
return rows