修改定时发送
parent
4262189508
commit
65bffa26b7
|
@ -17418,6 +17418,12 @@
|
|||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.TestPush">
|
||||
<summary>
|
||||
测试定时发送
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.GetTrialDocumentList(IRaCIS.Core.Application.Contracts.TrialDocumentQuery)">
|
||||
<summary>
|
||||
Setting 界面的 项目所有文档列表
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
|||
ConfirmTime = confirm.ConfirmTime,
|
||||
RealName = trialUser.IdentityUser.FullName,
|
||||
UserName = trialUser.IdentityUser.UserName,
|
||||
|
||||
UserCreateTime= trialUser.CreateTime,
|
||||
IdentityUserTypeList = trialUser.TrialUserRoleList.Select(t => t.UserRole.UserTypeRole.UserTypeShortName).ToList(),
|
||||
|
||||
DocNeedSignUserTypeList = trialDoc.NeedConfirmedUserTypeList.Select(t => t.UserTypeRole.UserTypeShortName).ToList(),
|
||||
|
@ -89,7 +89,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
|||
var datalist = await trialDocQuery.IgnoreQueryFilters().Where(t => t.IsDeleted == false && t.ConfirmTime == null)
|
||||
.ToListAsync();
|
||||
datalist = datalist.Where(x => x.SuggestFinishTime != null && x.SuggestFinishTime.Value.Date == DateTime.Now.Date)
|
||||
.Where(x => x.IsNeedSendEmial).ToList();
|
||||
.ToList();
|
||||
var confirmUserIdList = datalist.Select(t => t.ConfirmUserId).Distinct().ToList();
|
||||
var userinfoList = await _identityUserRepository.Where(x => confirmUserIdList.Contains(x.Id)).ToListAsync();
|
||||
|
||||
|
|
|
@ -118,6 +118,24 @@ namespace IRaCIS.Core.Application.Services
|
|||
return ResponseOutput.Result(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试定时发送
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> TestPush()
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
// 创建独立作用域
|
||||
using (var scope = serviceScopeFactory.CreateScope())
|
||||
{
|
||||
// 从新作用域解析服务
|
||||
var mediator = scope.ServiceProvider.GetRequiredService<IMediator>();
|
||||
await mediator.Publish(new TrialDocumentErverDayEvent { });
|
||||
}
|
||||
});
|
||||
return ResponseOutput.Result(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Setting 界面的 项目所有文档列表
|
||||
|
|
Loading…
Reference in New Issue