短信通知

This commit is contained in:
马梓彭 2026-09-21 15:07:54 +08:00
parent 321be399ee
commit f6267162c1
3 changed files with 5 additions and 3 deletions

View File

@ -410,7 +410,7 @@ public partial class CheckinController : IDynamicApiController
/// 对报名了所选项目的人员发送检录通知;单人失败不影响整体流程。
/// 个人项目:通知运动员本人(从 EventRegistrationPerson 取)。
/// 团队项目:通知教练和领队(从 TeamMember 取,因为报名表中不存储教练/领队的 RegistrationItemId)。
/// 短信内容:您报名的{赛事名称}正在检录,当前检录至第{x}场次,您所在第{y}场次,请提前前往检录区做好准备。
/// 短信内容:您报名的{赛事名称}正在检录,当前检录至{项目名称}第{x}场次,您所在第{y}场次,请提前前往检录区做好准备。
/// </summary>
private async Task<(int Total, int Success, int Failed)> NotifyUnitsAsync(
List<CheckinOrderBookUnitDto> units,
@ -446,7 +446,7 @@ public partial class CheckinController : IDynamicApiController
// 当前检录进度:获取该项目在秩序册中的起始场次
var firstSessionIndex = units.Select(x => x.SessionIndex).FirstOrDefault(x => x > 0);
if (firstSessionIndex <= 0) firstSessionIndex = 1;
var currentSession = $"第{firstSessionIndex}场次";
var currentSession = $"{projectName}第{firstSessionIndex}场次";
var success = 0;
var failed = missingPhoneCount;

View File

@ -79,6 +79,7 @@ public class AliyunSmsService : ITransient
/// <summary>
/// 发送检录通知短信;未配置检录模板时返回 false 由调用方降级处理。
/// 模板示例:您报名的${event}正在检录,当前检录至${current},您所在第${order}场次,请提前前往检录区做好准备。
/// current 参数格式:{项目名称}第{x}场次。
/// </summary>
public async Task<bool> SendCheckinNotice(string phone, string eventName, string currentSession, int sessionOrder)
{

View File

@ -32,7 +32,8 @@ public class SmsOptions : IConfigurableOptions
public string VerificationCodeTemplateCode { get; set; }
/// <summary>
/// 检录通知模板Code;模板格式:您报名的${event}正在检录,当前检录至${current},您所在第${order}场次,请提前前往检录区做好准备。未配置时不发送检录短信。
/// 检录通知模板Code;模板格式:您报名的${event}正在检录,当前检录至${current},您所在第${order}场次,请提前前往检录区做好准备。
/// current 参数格式为“{项目名称}第{x}场次”;未配置时不发送检录短信。
/// </summary>
[ConfigurationKeyName("CheckinNoticeTemplate")]
public string? CheckinNoticeTemplateCode { get; set; }