diff --git a/VERSION b/VERSION index 307f000..03fcdbc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -VERSION=1.2.60 +1.2.73 diff --git a/backend/app/routers/yichens.py b/backend/app/routers/yichens.py index 296d4d0..695b672 100644 --- a/backend/app/routers/yichens.py +++ b/backend/app/routers/yichens.py @@ -256,10 +256,10 @@ async def get_today_category_stats(db: Session = Depends(get_coolbot_db)): def get_dragons_stats_today( db: Session = Depends(get_coolbot_db) ): - """获取今日龙钞详细统计数据(按号码分类)- 就高不就低""" + """获取今日龙钞详细统计数据(按号码分类)""" from sqlalchemy import text - # 1. 带4:包含"带4"、"带四"、"通货" + # 带4龙钞(包含"龙"且包含"4") dai4 = db.execute(text(""" SELECT COUNT(*) as total, @@ -268,14 +268,10 @@ def get_dragons_stats_today( FROM yichens_posts WHERE post_time >= CURRENT_DATE AND category LIKE '%龙%' - AND ( - content LIKE '%带4%' OR title LIKE '%带4%' - OR content LIKE '%带四%' OR title LIKE '%带四%' - OR content LIKE '%通货%' OR title LIKE '%通货%' - ) + AND (content LIKE '%带4%' OR title LIKE '%带4%') """)).fetchone() - # 2. 无4:包含"无4"、"无四",排除"无47"、"无247"、"无四七"、"永恒" + # 无4龙钞(包含"龙"且包含"无4"但不包含"无47") wu4 = db.execute(text(""" SELECT COUNT(*) as total, @@ -284,17 +280,14 @@ def get_dragons_stats_today( FROM yichens_posts WHERE post_time >= CURRENT_DATE AND category LIKE '%龙%' - AND ( - content LIKE '%无4%' OR title LIKE '%无4%' - OR content LIKE '%无四%' OR title LIKE '%无四%' - ) - AND content NOT LIKE '%无47%' AND title NOT LIKE '%无47%' - AND content NOT LIKE '%无247%' AND title NOT LIKE '%无247%' - AND content NOT LIKE '%永恒%' AND title NOT LIKE '%永恒%' - AND content NOT LIKE '%无四七%' AND title NOT LIKE '%无四七%' + AND (content LIKE '%无4%' OR title LIKE '%无4%') + AND content NOT LIKE '%无47%' + AND title NOT LIKE '%无47%' + AND content NOT LIKE '%无247%' + AND title NOT LIKE '%无247%' """)).fetchone() - # 3. 无47:包含"无47"、"永恒"、"无四七",排除"无247" + # 无47龙钞(包含"龙"且包含"无47"但不包含"无247") wu47 = db.execute(text(""" SELECT COUNT(*) as total, @@ -303,15 +296,12 @@ def get_dragons_stats_today( FROM yichens_posts WHERE post_time >= CURRENT_DATE AND category LIKE '%龙%' - AND ( - content LIKE '%无47%' OR title LIKE '%无47%' - OR content LIKE '%永恒%' OR title LIKE '%永恒%' - OR content LIKE '%无四七%' OR title LIKE '%无四七%' - ) - AND content NOT LIKE '%无247%' AND title NOT LIKE '%无247%' + AND (content LIKE '%无47%' OR title LIKE '%无47%') + AND content NOT LIKE '%无247%' + AND title NOT LIKE '%无247%' """)).fetchone() - # 4. 无247:包含"无247"、"天马"、"金山",排除"无347" + # 无247龙钞(包含"龙"且包含"无247"但不包含"无347") wu247 = db.execute(text(""" SELECT COUNT(*) as total, @@ -320,15 +310,12 @@ def get_dragons_stats_today( FROM yichens_posts WHERE post_time >= CURRENT_DATE AND category LIKE '%龙%' - AND ( - content LIKE '%无247%' OR title LIKE '%无247%' - OR content LIKE '%天马%' OR title LIKE '%天马%' - OR content LIKE '%金山%' OR title LIKE '%金山%' - ) - AND content NOT LIKE '%无347%' AND title NOT LIKE '%无347%' + AND (content LIKE '%无247%' OR title LIKE '%无247%') + AND content NOT LIKE '%无347%' + AND title NOT LIKE '%无347%' """)).fetchone() - # 5. 无347:包含"无347"、"钻石"、"金马"、"魅力"、"朦胧" + # 无347龙钞(包含"龙"且包含"无347") wu347 = db.execute(text(""" SELECT COUNT(*) as total, @@ -337,13 +324,7 @@ def get_dragons_stats_today( FROM yichens_posts WHERE post_time >= CURRENT_DATE AND category LIKE '%龙%' - AND ( - content LIKE '%无347%' OR title LIKE '%无347%' - OR content LIKE '%钻石%' OR title LIKE '%钻石%' - OR content LIKE '%金马%' OR title LIKE '%金马%' - OR content LIKE '%魅力%' OR title LIKE '%魅力%' - OR content LIKE '%朦胧%' OR title LIKE '%朦胧%' - ) + AND (content LIKE '%无347%' OR title LIKE '%无347%') """)).fetchone() return { diff --git a/config/VERSION b/config/VERSION index 5effd94..03fcdbc 100644 --- a/config/VERSION +++ b/config/VERSION @@ -1 +1 @@ -VERSION=1.2.63 +1.2.73