From a93f978ffaf87d5e122b6f808ba0229f3b483a26 Mon Sep 17 00:00:00 2001 From: wzh425 Date: Fri, 17 Jul 2026 10:37:24 +0800 Subject: [PATCH] fix: enhance join conditions in ChannelStatisticsQueryHandler to include UserId Updated join conditions in ChannelStatisticsQueryHandler to include UserId for more accurate data retrieval when matching records with receiver users. This change improves the integrity of the data being processed in channel statistics queries. --- .../ChannelStatistics/ChannelStatisticsQueryHandler.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Services/Masa.Mc.Service/Application/ChannelStatistics/ChannelStatisticsQueryHandler.cs b/src/Services/Masa.Mc.Service/Application/ChannelStatistics/ChannelStatisticsQueryHandler.cs index 54d8f427..f66af931 100644 --- a/src/Services/Masa.Mc.Service/Application/ChannelStatistics/ChannelStatisticsQueryHandler.cs +++ b/src/Services/Masa.Mc.Service/Application/ChannelStatistics/ChannelStatisticsQueryHandler.cs @@ -33,8 +33,8 @@ public async Task GetAppVendorSendStatisticsAsync(GetAppVendorSendStatisticsQuer var grouped = await (from record in records join receiver in receiverUsers - on new { record.MessageTaskHistoryId, record.ChannelUserIdentity } - equals new { receiver.MessageTaskHistoryId, receiver.ChannelUserIdentity } into receiverGroup + on new { record.MessageTaskHistoryId, record.ChannelUserIdentity, record.UserId } + equals new { receiver.MessageTaskHistoryId, receiver.ChannelUserIdentity, receiver.UserId } into receiverGroup from receiver in receiverGroup.DefaultIfEmpty() select new { @@ -250,8 +250,8 @@ private IQueryable ApplyVendorFilter(IQueryable