feat: 新增请求访问统计功能

This commit is contained in:
chenchun
2024-08-14 12:50:28 +08:00
parent 23ffd23694
commit 27051aa01d
7 changed files with 249 additions and 86 deletions

View File

@@ -0,0 +1,20 @@
namespace Yi.Framework.Bbs.Domain.Shared.Caches;
public class AccessLogCacheItem
{
public AccessLogCacheItem(long number)
{
Number = number;
}
public long Number { get; set; }
public DateTime LastModificationTime { get; set; }=DateTime.Now;
public DateTime LastInsertTime { get; set; }=DateTime.Now;
}
public class AccessLogCacheConst
{
public const string Key = "AccessLog";
}

View File

@@ -0,0 +1,14 @@
namespace Yi.Framework.Bbs.Domain.Shared.Enums;
public enum AccessLogTypeEnum
{
/// <summary>
/// 首页点击量
/// </summary>
HomeClick,
/// <summary>
/// 接口请求量
/// </summary>
Request
}