v1.2.73 - 回退到初始状态
This commit is contained in:
parent
7b5ff97e1d
commit
60076449f8
|
|
@ -256,10 +256,10 @@ async def get_today_category_stats(db: Session = Depends(get_coolbot_db)):
|
||||||
def get_dragons_stats_today(
|
def get_dragons_stats_today(
|
||||||
db: Session = Depends(get_coolbot_db)
|
db: Session = Depends(get_coolbot_db)
|
||||||
):
|
):
|
||||||
"""获取今日龙钞详细统计数据(按号码分类)- 就高不就低"""
|
"""获取今日龙钞详细统计数据(按号码分类)"""
|
||||||
from sqlalchemy import text
|
from sqlalchemy import text
|
||||||
|
|
||||||
# 1. 带4:包含"带4"、"带四"、"通货"
|
# 带4龙钞(包含"龙"且包含"4")
|
||||||
dai4 = db.execute(text("""
|
dai4 = db.execute(text("""
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(*) as total,
|
COUNT(*) as total,
|
||||||
|
|
@ -268,14 +268,10 @@ def get_dragons_stats_today(
|
||||||
FROM yichens_posts
|
FROM yichens_posts
|
||||||
WHERE post_time >= CURRENT_DATE
|
WHERE post_time >= CURRENT_DATE
|
||||||
AND category LIKE '%龙%'
|
AND category LIKE '%龙%'
|
||||||
AND (
|
AND (content LIKE '%带4%' OR title LIKE '%带4%')
|
||||||
content LIKE '%带4%' OR title LIKE '%带4%'
|
|
||||||
OR content LIKE '%带四%' OR title LIKE '%带四%'
|
|
||||||
OR content LIKE '%通货%' OR title LIKE '%通货%'
|
|
||||||
)
|
|
||||||
""")).fetchone()
|
""")).fetchone()
|
||||||
|
|
||||||
# 2. 无4:包含"无4"、"无四",排除"无47"、"无247"、"无四七"、"永恒"
|
# 无4龙钞(包含"龙"且包含"无4"但不包含"无47")
|
||||||
wu4 = db.execute(text("""
|
wu4 = db.execute(text("""
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(*) as total,
|
COUNT(*) as total,
|
||||||
|
|
@ -284,17 +280,14 @@ def get_dragons_stats_today(
|
||||||
FROM yichens_posts
|
FROM yichens_posts
|
||||||
WHERE post_time >= CURRENT_DATE
|
WHERE post_time >= CURRENT_DATE
|
||||||
AND category LIKE '%龙%'
|
AND category LIKE '%龙%'
|
||||||
AND (
|
AND (content LIKE '%无4%' OR title LIKE '%无4%')
|
||||||
content LIKE '%无4%' OR title LIKE '%无4%'
|
AND content NOT LIKE '%无47%'
|
||||||
OR content LIKE '%无四%' OR title LIKE '%无四%'
|
AND title NOT LIKE '%无47%'
|
||||||
)
|
AND content NOT LIKE '%无247%'
|
||||||
AND content NOT LIKE '%无47%' AND title NOT LIKE '%无47%'
|
AND title NOT LIKE '%无247%'
|
||||||
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 '%无四七%'
|
|
||||||
""")).fetchone()
|
""")).fetchone()
|
||||||
|
|
||||||
# 3. 无47:包含"无47"、"永恒"、"无四七",排除"无247"
|
# 无47龙钞(包含"龙"且包含"无47"但不包含"无247")
|
||||||
wu47 = db.execute(text("""
|
wu47 = db.execute(text("""
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(*) as total,
|
COUNT(*) as total,
|
||||||
|
|
@ -303,15 +296,12 @@ def get_dragons_stats_today(
|
||||||
FROM yichens_posts
|
FROM yichens_posts
|
||||||
WHERE post_time >= CURRENT_DATE
|
WHERE post_time >= CURRENT_DATE
|
||||||
AND category LIKE '%龙%'
|
AND category LIKE '%龙%'
|
||||||
AND (
|
AND (content LIKE '%无47%' OR title LIKE '%无47%')
|
||||||
content LIKE '%无47%' OR title LIKE '%无47%'
|
AND content NOT LIKE '%无247%'
|
||||||
OR content LIKE '%永恒%' OR title LIKE '%永恒%'
|
AND title NOT LIKE '%无247%'
|
||||||
OR content LIKE '%无四七%' OR title LIKE '%无四七%'
|
|
||||||
)
|
|
||||||
AND content NOT LIKE '%无247%' AND title NOT LIKE '%无247%'
|
|
||||||
""")).fetchone()
|
""")).fetchone()
|
||||||
|
|
||||||
# 4. 无247:包含"无247"、"天马"、"金山",排除"无347"
|
# 无247龙钞(包含"龙"且包含"无247"但不包含"无347")
|
||||||
wu247 = db.execute(text("""
|
wu247 = db.execute(text("""
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(*) as total,
|
COUNT(*) as total,
|
||||||
|
|
@ -320,15 +310,12 @@ def get_dragons_stats_today(
|
||||||
FROM yichens_posts
|
FROM yichens_posts
|
||||||
WHERE post_time >= CURRENT_DATE
|
WHERE post_time >= CURRENT_DATE
|
||||||
AND category LIKE '%龙%'
|
AND category LIKE '%龙%'
|
||||||
AND (
|
AND (content LIKE '%无247%' OR title LIKE '%无247%')
|
||||||
content LIKE '%无247%' OR title LIKE '%无247%'
|
AND content NOT LIKE '%无347%'
|
||||||
OR content LIKE '%天马%' OR title LIKE '%天马%'
|
AND title NOT LIKE '%无347%'
|
||||||
OR content LIKE '%金山%' OR title LIKE '%金山%'
|
|
||||||
)
|
|
||||||
AND content NOT LIKE '%无347%' AND title NOT LIKE '%无347%'
|
|
||||||
""")).fetchone()
|
""")).fetchone()
|
||||||
|
|
||||||
# 5. 无347:包含"无347"、"钻石"、"金马"、"魅力"、"朦胧"
|
# 无347龙钞(包含"龙"且包含"无347")
|
||||||
wu347 = db.execute(text("""
|
wu347 = db.execute(text("""
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(*) as total,
|
COUNT(*) as total,
|
||||||
|
|
@ -337,13 +324,7 @@ def get_dragons_stats_today(
|
||||||
FROM yichens_posts
|
FROM yichens_posts
|
||||||
WHERE post_time >= CURRENT_DATE
|
WHERE post_time >= CURRENT_DATE
|
||||||
AND category LIKE '%龙%'
|
AND category LIKE '%龙%'
|
||||||
AND (
|
AND (content LIKE '%无347%' OR title LIKE '%无347%')
|
||||||
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 '%朦胧%'
|
|
||||||
)
|
|
||||||
""")).fetchone()
|
""")).fetchone()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
VERSION=1.2.63
|
1.2.73
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue