v1.2.98 - 修复管理员用户列表行情数显示问题,改为显示实际发布的行情数量
This commit is contained in:
parent
524601afc3
commit
57e51f6c28
|
|
@ -114,6 +114,11 @@ def get_users(
|
|||
for u in users:
|
||||
# 统计每个用户的藏品数量
|
||||
count = db.query(Collection).filter(Collection.f99_91_user_id == u.f99_90_id).count()
|
||||
# 统计每个用户发布的行情数量(info_type='deal')
|
||||
deal_count = db.query(Information).filter(
|
||||
Information.user_id == u.f99_90_id,
|
||||
Information.info_type == "deal"
|
||||
).count()
|
||||
user_list.append({
|
||||
"id": u.f99_90_id,
|
||||
"username": u.f01_01_name,
|
||||
|
|
@ -123,6 +128,7 @@ def get_users(
|
|||
"user_code": u.user_code,
|
||||
"created_at": u.f99_92_created_at.isoformat() if u.f99_92_created_at else None,
|
||||
"collectionCount": count,
|
||||
"dealCount": deal_count,
|
||||
"level": u.f99_94_level,
|
||||
"aiCount": u.f99_95_ai_count,
|
||||
"searchCount": u.f99_96_search_count,
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ export default function Admin() {
|
|||
🤖 AI识别: {user.aiCount || 0}次
|
||||
</div>
|
||||
<div style={{ background: 'rgba(20, 184, 166, 0.1)', padding: '4px 10px', borderRadius: '6px', fontSize: '12px', color: '#14b8a6' }}>
|
||||
🎯 配号: {user.searchCount || 0}次
|
||||
📈 行情: {user.dealCount || 0}条
|
||||
</div>
|
||||
<div style={{ background: 'rgba(245, 158, 11, 0.1)', padding: '4px 10px', borderRadius: '6px', fontSize: '12px', color: '#f59e0b' }}>
|
||||
🔍 寻号: {user.searchCount || 0}次
|
||||
|
|
|
|||
Loading…
Reference in New Issue