赛事教练筛选

This commit is contained in:
马梓彭 2026-04-14 15:20:12 +08:00
parent 5a86989ec5
commit f7aedcce91
2 changed files with 22 additions and 4 deletions

View File

@ -140,13 +140,18 @@ public class CoachLeaderListOutput
/// <summary>
/// 年龄
/// </summary>
public int Age { get; set; }
public int? Age { get; set; }
/// <summary>
/// 性别
/// </summary>
public string Gender { get; set; }
/// <summary>
/// 出生日期
/// </summary>
public DateTime? BirthDate { get; set; }
/// <summary>
/// 身份证号
/// </summary>

View File

@ -10,6 +10,8 @@ using SqlSugar;
using OfficeOpenXml;
using OfficeOpenXml.Style;
using System.Drawing;
using static SKIT.FlurlHttpClient.Wechat.TenpayV3.Models.DepositMarketingMemberCardOpenCardCodesResponse.Types;
using YD_Event.Application.AppUser.Dtos;
namespace YD_Event.Application.Event;
@ -180,13 +182,24 @@ public class EventScoreService : BaseService<EventResult>, ITransient
Id = p.Id,
Name = p.Name,
Age = p.Age,
Gender = p.Gender.Description(),
IdCardNumber = p.IdCard,
Mobile = p.Phone,
IdCardNumber = p.IdCardImageUrl,
Mobile = p.Mobile,
CertificateId = 0 // 需要单独查询,此处先设为0
})
.ToPagedListAsync(input);
foreach (var item in pageResult.Rows)
{
if (item.Age.HasValue)
{
continue;
}
if (item.BirthDate.HasValue)
{
item.Age = MemberOutput.CalculateAgeFromBirthDate(item.BirthDate);
}
}
return pageResult;
}