就业get次昂管的dao层和api接口

This commit is contained in:
2026-09-21 22:58:21 +08:00
parent 7216922d8d
commit 337bfce8b1
2 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -45,12 +45,12 @@ def check_stu_dao(stu_id,db):
stu = db.query(Student_Model).filter(Student_Model.stu_id == stu_id,Student_Model.delete_status == 0).first()
return stu
def check_emp_dao(stu_id=):
# def check_emp_dao(stu_id=):
def update_emp_dao(emp_id,o,db):
def update_emp_dao(stu_id,o,db):
try:
rows = db.query(Employment_info).filter(Employment_info.emp_id == emp_id,Employment_info.delete_status == 0).first()
rows = db.query(Employment_info).filter(Employment_info.stu_id == stu_id,Employment_info.delete_status == 0).first()
db.commit()
return rows
except:
@@ -58,9 +58,9 @@ def update_emp_dao(emp_id,o,db):
raise HTTPException(status_code=404,detail='该就业记录已存在')
def delete_emp_dao(emp_id,db):
def delete_emp_dao(stu_id,db):
try:
rows = db.query(Employment_info).filter(Employment_info.emp_id == emp_id,Employment_info.delete_status == 0).delete()
rows = db.query(Employment_info).filter(Employment_info.stu_id == stu_id,Employment_info.delete_status == 0).delete()
db.commit()
except:
db.rollback()