feat: 新增全站历史统计功能

This commit is contained in:
陈淳
2024-02-27 13:43:56 +08:00
parent 5a2d9125d4
commit 6697649b97
7 changed files with 148 additions and 52 deletions

View File

@@ -44,6 +44,21 @@ namespace Yi.Framework.Bbs.Application.Services
}
}
/// <summary>
/// 获取全部访问流量
/// </summary>
/// <returns></returns>
public async Task<List<AccessLogDto>> Get()
{
var entities = await _repository._DbQueryable.OrderBy(x => x.CreationTime).ToListAsync();
var output = entities.Adapt<List<AccessLogDto>>();
output?.ForEach(x => x.CreationTime = x.CreationTime.Date);
return output;
}
/// <summary>
/// 触发
/// </summary>
@@ -106,5 +121,8 @@ namespace Yi.Framework.Bbs.Application.Services
return result.ToArray();
}
}
}

View File

@@ -93,5 +93,6 @@ namespace Yi.Framework.Bbs.Application.Services.Analyses
}
}
}
}