运营报表 最近使用时间更新

This commit is contained in:
ping 2026-06-18 14:58:47 +08:00
parent 51f7f189c0
commit 9ed276a313

View File

@ -307,7 +307,11 @@ def _aggregate_admin_summary(items, user_map, org_map):
bucket['request_count'] += 1
usage_time = item.get('usage_time')
if usage_time:
bucket['last_usage_time'] = usage_time
if (
not bucket.get('last_usage_time')
or str(usage_time) > str(bucket['last_usage_time'])
):
bucket['last_usage_time'] = usage_time
if (
not bucket.get('first_usage_time')
or str(usage_time) < str(bucket['first_usage_time'])