fix: 使用Information.id统计

This commit is contained in:
甲辰生产 2026-04-08 13:16:17 +08:00
parent 92bc6ab8d6
commit e17024128f
1 changed files with 2 additions and 2 deletions

View File

@ -1102,12 +1102,12 @@ def get_seek_stats(
# 自有匹配成功is_matched = 'confirmed' # 自有匹配成功is_matched = 'confirmed'
# 网络数据匹配成功is_matched = 'pending_network'(表示网络数据已匹配) # 网络数据匹配成功is_matched = 'pending_network'(表示网络数据已匹配)
from sqlalchemy import func from sqlalchemy import func
self_matched = db.query(func.count(Information.f99_90_id)).filter( self_matched = db.query(func.count(Information.id)).filter(
Information.info_type == 'seek', Information.info_type == 'seek',
Information.is_matched == 'confirmed' Information.is_matched == 'confirmed'
).scalar() or 0 ).scalar() or 0
network_matched = db.query(func.count(Information.f99_90_id)).filter( network_matched = db.query(func.count(Information.id)).filter(
Information.info_type == 'seek', Information.info_type == 'seek',
Information.is_matched == 'pending_network' Information.is_matched == 'pending_network'
).scalar() or 0 ).scalar() or 0