refactor: 重构数据库orm为异步 #I9MRQS

This commit is contained in:
insistence
2024-05-17 15:04:30 +08:00
parent 18103e3d38
commit 1972f1cb6d
52 changed files with 1414 additions and 1246 deletions

View File

@@ -131,7 +131,7 @@ def log_decorator(title: str, business_type: int, log_type: Optional[str] = 'ope
login_log['status'] = str(status)
login_log['msg'] = result_dict.get('msg')
LoginLogService.add_login_log_services(query_db, LogininforModel(**login_log))
await LoginLogService.add_login_log_services(query_db, LogininforModel(**login_log))
else:
current_user = await LoginService.get_current_user(request, token, query_db)
oper_name = current_user.user.user_name
@@ -154,7 +154,7 @@ def log_decorator(title: str, business_type: int, log_type: Optional[str] = 'ope
operTime=oper_time,
costTime=int(cost_time)
)
OperationLogService.add_operation_log_services(query_db, operation_log)
await OperationLogService.add_operation_log_services(query_db, operation_log)
return result