diff --git a/backend/app/routers/ocr.py b/backend/app/routers/ocr.py index c49155d..29f8546 100644 --- a/backend/app/routers/ocr.py +++ b/backend/app/routers/ocr.py @@ -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],