diff --git a/src/SJZY.Track.Application/SJZY.Track.Application.csproj b/src/SJZY.Track.Application/SJZY.Track.Application.csproj
index 407f97d8..9c1fe137 100644
--- a/src/SJZY.Track.Application/SJZY.Track.Application.csproj
+++ b/src/SJZY.Track.Application/SJZY.Track.Application.csproj
@@ -9,16 +9,17 @@
+
-
-
-
-
-
+
+
+
+
+
diff --git a/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningNotifyService.cs b/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningNotifyService.cs
index d51fee1b..2859eda9 100644
--- a/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningNotifyService.cs
+++ b/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningNotifyService.cs
@@ -2,13 +2,20 @@ using System.Text;
using FreeRedis;
using SJZY.Expand.ABP.Core;
using SJZY.Expand.ABP.Core.Logger;
+using SJZY.FSCenter.Application.Dtos.Message;
+using SJZY.FSCenter.Client.Client.Message;
+using SJZY.FSCenter.Repository.Enum;
using SJZY.Track.Application.Contract.Dtos.Forewarning;
using SJZY.Track.Application.Contract.Services;
using SJZY.Track.Domain.Aggregates.ForewarningAggregate;
using SJZY.Track.Domain.Dtos.Forewarning;
using SJZY.Track.Domain.Queries;
using SJZY.Track.Share.Enums;
+using SJZY.UserCenter.HttpApi.Services.Message;
+using SJZY.UserCenter.SharedModel.Dtos.Message;
+using SJZY.UserCenter.SharedModel.Enums;
using Volo.Abp.DependencyInjection;
+using Volo.Abp.Http.Client.DynamicProxying;
namespace SJZY.Track.Application.Services.ForewarningServices;
@@ -18,15 +25,20 @@ namespace SJZY.Track.Application.Services.ForewarningServices;
public class ForewarningNotifyService : IForewarningNotifyService, ITransientDependency
{
private readonly IForewarningCacheService _cacheService;
+ private readonly IMessageClient _messageClient;
+ private readonly IHttpClientProxy _requestSendMessageService;
private readonly IWarningQueries _warningQueries;
private readonly IWarningRecordEsRepository _warningRecordEsRepository;
public ForewarningNotifyService(IForewarningCacheService cacheService, IWarningQueries warningQueries,
- IWarningRecordEsRepository warningRecordEsRepository)
+ IWarningRecordEsRepository warningRecordEsRepository,
+ IHttpClientProxy requestSendMessageService, IMessageClient messageClient)
{
_cacheService = cacheService;
_warningQueries = warningQueries;
_warningRecordEsRepository = warningRecordEsRepository;
+ _requestSendMessageService = requestSendMessageService;
+ _messageClient = messageClient;
}
///
@@ -162,11 +174,41 @@ public class ForewarningNotifyService : IForewarningNotifyService, ITransientDep
if (!string.IsNullOrEmpty(siteInternalContent))
{
// todo:发送站内通知
+ _ = _requestSendMessageService.Service.SendMessageByEmptyTemplateAsync(
+ new SendMessageByEmptyTemplateInput
+ {
+ IsNeedToHandle = null,
+ BizId = null,
+ MsgSource = null,
+ SystemId = 0,
+ TemplateCode = null,
+ Channels = null,
+ MsgTitle = null,
+ MsgContent = null,
+ PcURl = null,
+ MobileURl = null,
+ FileUrl = null,
+ fileName = null,
+ receivers = null,
+ SiteLetterComponentStyle = (ComponentStyle) 0
+ });
}
if (!string.IsNullOrEmpty(feiShuContent))
{
- // todo:发送飞书通知
+ // 发送飞书通知
+ _ = _messageClient.SendMessageAsync(new SendMessageInput
+ {
+ AppId = null,
+ AppSecret = null,
+ ReceiveIdType = IdTypeEnums.user_id,
+ MsgType = MsgTypeEnums.文本,
+ ReceiveIds = new List
+ {
+ userRule.Key.ToString()
+ },
+ Content = feiShuContent
+ });
}
}
diff --git a/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs b/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs
index e39da04e..993f6137 100644
--- a/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs
+++ b/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs
@@ -7,6 +7,7 @@ using Savorboard.CAP.InMemoryMessageQueue;
using SJZY.Expand.ABP.Core.Localization;
using SJZY.Expand.ABP.Core.Logger;
using SJZY.Expand.ABP.Core.PublicMethords;
+using SJZY.FSCenter.Client;
using SJZY.InterfaceRelay.Application.Contracts;
using SJZY.Track.Application.CAP;
using SJZY.Track.Application.Contract;
@@ -34,7 +35,8 @@ namespace SJZY.Track.Application;
typeof(SjzyUserCenterHttpApiModule),
typeof(SJZYInterfaceRelayApplicationContractsModule),
typeof(SjzyTrackDomainModule),
- typeof(SjzyTrackApplicationContractModule)
+ typeof(SjzyTrackApplicationContractModule),
+ typeof(FSCenterModule)
)]
public class SjzyTrackApplicationModule : AbpModule
{
@@ -149,6 +151,9 @@ public class SjzyTrackApplicationModule : AbpModule
}
};
}, typeof(SjzyTrackApplicationModule).Assembly);
+
+ // 飞书
+ context.Services.Configure(option => { option.SystemKey = "aaa"; });
}
public override void PreConfigureServices(ServiceConfigurationContext context)