Skip to content

Commit

Permalink
reactor : GetUnreadAsync add tag (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 authored Oct 12, 2023
1 parent f3f67ba commit 4ddc39c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ public interface IWebsiteMessageService

Task<List<WebsiteMessageTagModel>> GetListByTagAsync(List<string> tags, string channelCode);

Task<int> GetUnreadAsync(string channelCode);
Task<int> GetUnreadAsync(GetUnreadModel options);
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ public async Task<List<WebsiteMessageTagModel>> GetListByTagAsync(List<string> t
return await _caller.GetAsync<List<WebsiteMessageTagModel>>(requestUri, options) ?? new();
}

public async Task<int> GetUnreadAsync(string channelCode)
public async Task<int> GetUnreadAsync(GetUnreadModel options)
{
var requestUri = $"{_party}/Unread";
var options = new { channelCode };
return await _caller.GetAsync<int>(requestUri, options);
}
}

0 comments on commit 4ddc39c

Please sign in to comment.