From eeb1019e42abc3fc0e4b10b181b46c02b6e58843 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期四, 09 十月 2025 15:16:21 +0800
Subject: [PATCH] feat:开发
---
ApiTools.Application/SmsUtils/Commands/SmsChengLiYeNotifyCommandHandler.cs | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/ApiTools.Application/SmsUtils/Commands/SmsChengLiYeNotifyCommandHandler.cs b/ApiTools.Application/SmsUtils/Commands/SmsChengLiYeNotifyCommandHandler.cs
index ccb1e2f..fa100f2 100644
--- a/ApiTools.Application/SmsUtils/Commands/SmsChengLiYeNotifyCommandHandler.cs
+++ b/ApiTools.Application/SmsUtils/Commands/SmsChengLiYeNotifyCommandHandler.cs
@@ -1,5 +1,6 @@
-锘縰sing Baidu.Aip.BodyAnalysis;
-using ApiTools.Core;
+锘縰sing ApiTools.Core;
+using Baidu.Aip.BodyAnalysis;
+using Furion;
using Furion.DatabaseAccessor;
using Furion.HttpRemote;
using MediatR;
@@ -22,7 +23,8 @@
IHttpContextAccessor httpContextAccessor,
IRepository<SmsSetting> repSmsSetting,
IRepository<SmsLog> repSmsLog,
- ApiTools.Core.SmsUtils smsUtils
+ ApiTools.Core.SmsUtils smsUtils,
+ IHttpRemoteService httpRemoteService
) :
IRequestHandler<SmsChengLiYeNotifyCommand, bool>
{
@@ -30,6 +32,7 @@
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>
/// 璇氱珛涓氱煭淇″钩鍙板洖浼犻�氱煡
@@ -39,6 +42,18 @@
/// <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>();
--
Gitblit v1.9.1