fix: 修复各模块新增数据时创建时间记录异常的问题

This commit is contained in:
insistence
2024-06-26 21:05:25 +08:00
parent 88f9574aaa
commit d08fe67ab8
10 changed files with 25 additions and 2 deletions

View File

@@ -32,7 +32,9 @@ async def get_system_post_list(request: Request, post_page_query: PostPageQueryM
async def add_system_post(request: Request, add_post: PostModel, query_db: AsyncSession = Depends(get_db), current_user: CurrentUserModel = Depends(LoginService.get_current_user)):
try:
add_post.create_by = current_user.user.user_name
add_post.create_time = datetime.now()
add_post.update_by = current_user.user.user_name
add_post.update_time = datetime.now()
add_post_result = await PostService.add_post_services(query_db, add_post)
if add_post_result.is_success:
logger.info(add_post_result.message)