From 8e406ac09d3d62cc9283b008840f8b04820fa533 Mon Sep 17 00:00:00 2001 From: Fantasy lee <129943055+Fantasylee21@users.noreply.github.com> Date: Mon, 9 Jun 2025 16:19:05 +0800 Subject: [PATCH] =?UTF-8?q?[fix]:=20=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/curd/articleDB.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/curd/articleDB.py b/app/curd/articleDB.py index 9a4bfb9..62256ae 100644 --- a/app/curd/articleDB.py +++ b/app/curd/articleDB.py @@ -67,10 +67,6 @@ async def search_article_in_db(db: AsyncSession, search_article: SearchArticle): articles = result.scalars().all() total_count = len(articles) # 更新所有搜索到文章的点击量 - for article in articles: - article.clicks += 1 # 增加点击量 - await db.commit() - await db.refresh(article) return [GetResponse.model_validate(article) for article in articles], total_count async def get_article_in_db_by_id(db: AsyncSession, article_id: int):