From 8662fbc6254e2ae9f85e040ecf0bb9f1d85d0444 Mon Sep 17 00:00:00 2001 From: longda Date: Tue, 24 Mar 2026 23:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E:=20AI=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E5=90=8E=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=96=B0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/routers/ocr.py | 5 +++++ 1 file changed, 5 insertions(+) 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],