fix: 使用Information.id统计
This commit is contained in:
parent
92bc6ab8d6
commit
e17024128f
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue