From 4ddc39c33f0bf1a7f0b89e9b85f6d1a8c23540e8 Mon Sep 17 00:00:00 2001 From: wzh425 Date: Thu, 12 Oct 2023 10:00:34 +0800 Subject: [PATCH] reactor : GetUnreadAsync add tag (#673) --- .../Model/GetUnreadModel.cs | 11 +++++++++++ .../Service/IWebsiteMessageService.cs | 2 +- .../Service/WebsiteMessageService.cs | 3 +-- 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 src/BuildingBlocks/StackSdks/Masa.BuildingBlocks.StackSdks.Mc/Model/GetUnreadModel.cs diff --git a/src/BuildingBlocks/StackSdks/Masa.BuildingBlocks.StackSdks.Mc/Model/GetUnreadModel.cs b/src/BuildingBlocks/StackSdks/Masa.BuildingBlocks.StackSdks.Mc/Model/GetUnreadModel.cs new file mode 100644 index 000000000..1bdf15e05 --- /dev/null +++ b/src/BuildingBlocks/StackSdks/Masa.BuildingBlocks.StackSdks.Mc/Model/GetUnreadModel.cs @@ -0,0 +1,11 @@ +// Copyright (c) MASA Stack All rights reserved. +// Licensed under the MIT License. See LICENSE.txt in the project root for license information. + +namespace Masa.BuildingBlocks.StackSdks.Mc.Model; + +public class GetUnreadModel +{ + public string ChannelCode { get; set; } = string.Empty; + + public string Tag { get; set; } = string.Empty; +} diff --git a/src/BuildingBlocks/StackSdks/Masa.BuildingBlocks.StackSdks.Mc/Service/IWebsiteMessageService.cs b/src/BuildingBlocks/StackSdks/Masa.BuildingBlocks.StackSdks.Mc/Service/IWebsiteMessageService.cs index c86186848..0f7a91fe8 100644 --- a/src/BuildingBlocks/StackSdks/Masa.BuildingBlocks.StackSdks.Mc/Service/IWebsiteMessageService.cs +++ b/src/BuildingBlocks/StackSdks/Masa.BuildingBlocks.StackSdks.Mc/Service/IWebsiteMessageService.cs @@ -27,5 +27,5 @@ public interface IWebsiteMessageService Task> GetListByTagAsync(List tags, string channelCode); - Task GetUnreadAsync(string channelCode); + Task GetUnreadAsync(GetUnreadModel options); } diff --git a/src/Contrib/StackSdks/Masa.Contrib.StackSdks.Mc/Service/WebsiteMessageService.cs b/src/Contrib/StackSdks/Masa.Contrib.StackSdks.Mc/Service/WebsiteMessageService.cs index 5012b50e4..ad3c3934f 100644 --- a/src/Contrib/StackSdks/Masa.Contrib.StackSdks.Mc/Service/WebsiteMessageService.cs +++ b/src/Contrib/StackSdks/Masa.Contrib.StackSdks.Mc/Service/WebsiteMessageService.cs @@ -77,10 +77,9 @@ public async Task> GetListByTagAsync(List t return await _caller.GetAsync>(requestUri, options) ?? new(); } - public async Task GetUnreadAsync(string channelCode) + public async Task GetUnreadAsync(GetUnreadModel options) { var requestUri = $"{_party}/Unread"; - var options = new { channelCode }; return await _caller.GetAsync(requestUri, options); } }