新增: AI识别后自动更新用户识别次数
This commit is contained in:
parent
2bad73e2de
commit
8662fbc625
|
|
@ -175,11 +175,16 @@ async def recognize_image(
|
|||
|
||||
fields = extract_fields(text_content)
|
||||
|
||||
# 更新用户AI识别次数
|
||||
current_user.f99_95_ai_count = (current_user.f99_95_ai_count or 0) + 1
|
||||
db.commit()
|
||||
|
||||
# 返回识别结果和临时图片路径
|
||||
return {
|
||||
"success": True,
|
||||
"text": text_content,
|
||||
"fields": fields,
|
||||
"aiCount": current_user.f99_95_ai_count,
|
||||
"temp_image": {
|
||||
"id": temp_id,
|
||||
"filename": oss_key.split('/')[-1],
|
||||
|
|
|
|||
Loading…
Reference in New Issue