| | |
| | | using Baidu.Aip.BodyAnalysis; |
| | | using ApiTools.Core; |
| | | using ApiTools.Core; |
| | | using Baidu.Aip.BodyAnalysis; |
| | | using Furion; |
| | | using Furion.DatabaseAccessor; |
| | | using Furion.HttpRemote; |
| | | using MediatR; |
| | |
| | | IHttpContextAccessor httpContextAccessor, |
| | | IRepository<SmsSetting> repSmsSetting, |
| | | IRepository<SmsLog> repSmsLog, |
| | | ApiTools.Core.SmsUtils smsUtils |
| | | ApiTools.Core.SmsUtils smsUtils, |
| | | IHttpRemoteService httpRemoteService |
| | | ) : |
| | | IRequestHandler<SmsChengLiYeNotifyCommand, bool> |
| | | { |
| | |
| | | private readonly IRepository<SmsSetting> repSmsSetting = repSmsSetting; |
| | | private readonly IRepository<SmsLog> repSmsLog = repSmsLog; |
| | | private readonly ApiTools.Core.SmsUtils smsUtils = smsUtils; |
| | | private readonly IHttpRemoteService httpRemoteService = httpRemoteService; |
| | | |
| | | /// <summary> |
| | | /// 诚立业短信平台回传通知 |
| | |
| | | /// <returns></returns> |
| | | public async Task<bool> Handle(SmsChengLiYeNotifyCommand request, CancellationToken cancellationToken) |
| | | { |
| | | if (App.GetConfig<string>("Environment") == "Product") |
| | | { |
| | | try |
| | | { |
| | | await httpRemoteService.PostAsStringAsync("http://118.178.252.28:8780/api/common/sms/smsChengLiYeNotify", |
| | | builder => builder.SetJsonContent(request)); |
| | | } |
| | | catch |
| | | { |
| | | |
| | | } |
| | | } |
| | | if (request.MsgReports.IsNotNull()) |
| | | { |
| | | var templateCodes = await EnumUtils.GetModel<EnumSmsTemplateCode>(); |