1.新增引导词添加type和text的空判断

This commit is contained in:
haotian 2025-07-28 15:01:05 +08:00
parent 2da7a5936b
commit ea7f3aa373

View File

@ -47,6 +47,10 @@ async def add_guide_words(
query_db: AsyncSession = Depends(get_db),
current_user: CurrentUserModel = Depends(LoginService.get_current_user),
):
if add_words.type is None:
return ResponseUtil.failure(msg='引导词类型不能为空')
if add_words.text is None:
return ResponseUtil.failure(msg='引导词内容不能为空')
add_words.create_time = datetime.now()
add_words.update_time = datetime.now()
add_words.create_by = current_user.user.user_name