|
@@ -9,6 +9,7 @@ using Hotline.Share.Mq;
|
|
using Hotline.Users;
|
|
using Hotline.Users;
|
|
using MediatR;
|
|
using MediatR;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
+using StackExchange.Redis;
|
|
using XF.Domain.Dependency;
|
|
using XF.Domain.Dependency;
|
|
using XF.Domain.Repository;
|
|
using XF.Domain.Repository;
|
|
|
|
|
|
@@ -179,7 +180,19 @@ namespace Hotline.Application.Subscribers
|
|
.Where(x=> x.Id == dto.TaskId).FirstAsync();
|
|
.Where(x=> x.Id == dto.TaskId).FirstAsync();
|
|
if (task != null && task.SmsTaskState == ESmsTaskState.WaitDo && task.PlanSendTime.ToString("yyyy-MM-dd hh:mm") == DateTime.Now.ToString("yyyy-MM-dd hh:mm"))
|
|
if (task != null && task.SmsTaskState == ESmsTaskState.WaitDo && task.PlanSendTime.ToString("yyyy-MM-dd hh:mm") == DateTime.Now.ToString("yyyy-MM-dd hh:mm"))
|
|
{
|
|
{
|
|
-
|
|
|
|
|
|
+ foreach (var item in task.BatchSmsTaskDetails)
|
|
|
|
+ {
|
|
|
|
+ //发送短信
|
|
|
|
+ var messageDto = new Share.Dtos.Push.MessageDto
|
|
|
|
+ {
|
|
|
|
+ PushBusiness = EPushBusiness.BatchSms,
|
|
|
|
+ PushPlatform = EPushPlatform.Sms,
|
|
|
|
+ Name = item.Name,
|
|
|
|
+ TelNumber = item.PhoneNum,
|
|
|
|
+ Content = task.Content
|
|
|
|
+ };
|
|
|
|
+ await _mediator.Publish(new PushMessageNotify(messageDto), cancellationToken);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|