fix: 修复访问日志问题,添加easy.tools
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
<PackageReference Include="EasyTool.Core" Version="2023.914.2-pre-230916124403" />
|
||||
|
||||
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.8.8.43" />
|
||||
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.8.8.43" />
|
||||
<PackageReference Include="Furion.Pure" Version="4.8.8.43" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -49,7 +50,8 @@ namespace Yi.Furion.Application.Bbs.Services.Impl
|
||||
|
||||
private AccessLogDto[] WeekTimeHandler(AccessLogEntity[] data)
|
||||
{
|
||||
data = data.Where(x => x.CreationTime.DayOfWeek == DateTime.Now.DayOfWeek).ToArray();
|
||||
data = data.Where(x=>x.CreationTime>=EasyTool.DateTimeUtil.GetFirstDayOfWeek()).OrderByDescending(x=>x.CreationTime).DistinctBy(x=>x.CreationTime.DayOfWeek).ToArray();
|
||||
|
||||
Dictionary<DayOfWeek, AccessLogDto> processedData = new Dictionary<DayOfWeek, AccessLogDto>();
|
||||
|
||||
// 初始化字典,将每天的数据都设为0
|
||||
|
||||
Reference in New Issue
Block a user