Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reactor(stack-mc) : Some SDK methods support channel code #596

Merged
merged 6 commits into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,27 @@ namespace Masa.BuildingBlocks.StackSdks.Mc.Model;
public class GetMessageTaskModel : PaginatedOptions
{
public string Filter { get; set; } = string.Empty;

public Guid ChannelId { get; set; }

public string ChannelCode { get; set; } = string.Empty;

public MessageTypes? EntityType { get; set; }

public bool? IsDraft { get; set; }

public bool? IsEnabled { get; set; }

public MessageTaskTimeTypes? TimeType { get; set; }

public DateTime? StartTime { get; set; }

public DateTime? EndTime { get; set; }

public MessageTaskStatuses? Status { get; set; }

public MessageTaskSources? Source { get; set; }

public string SystemId { get; set; } = string.Empty;

public GetMessageTaskModel(int page, int pageSize, Dictionary<string, bool>? sorting = null) : base(page, pageSize, sorting)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public class GetWebsiteMessageModel : PaginatedOptions

public Guid? ChannelId { get; set; }

public string ChannelCode { get; set; } = string.Empty;

public bool? IsRead { get; set; }

public string Tag { get; set; } = string.Empty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public class MessageTaskUpsertModel

public Guid ChannelId { get; set; }

public string ChannelCode { get; set; } = string.Empty;

public ChannelTypes ChannelType { get; set; }

public MessageTypes EntityType { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public async Task DeleteAsync(Guid id)

public async Task<List<WebsiteMessageChannelModel>> GetChannelListAsync()
{
var requestUri = $"{_party}/GetChannelList";
var requestUri = $"{_party}/ChannelList";
return await _caller.GetAsync<List<WebsiteMessageChannelModel>>(requestUri) ?? new();
}

Expand All @@ -42,7 +42,7 @@ public async Task<PaginatedListModel<WebsiteMessageModel>> GetListAsync(GetWebsi

public async Task<List<WebsiteMessageModel>> GetNoticeListAsync(GetNoticeListModel options)
{
var requestUri = $"{_party}/GetNoticeList";
var requestUri = $"{_party}/NoticeList";
return await _caller.GetAsync<GetNoticeListModel, List<WebsiteMessageModel>>(requestUri, options) ?? new();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public async Task TestDeleteAsync()
public async Task TestGetChannelListAsync()
{
var data = new List<WebsiteMessageChannelModel>();
var requestUri = $"api/website-message/GetChannelList";
var requestUri = $"api/website-message/ChannelList";
var caller = new Mock<ICaller>();
caller.Setup(provider => provider.GetAsync<List<WebsiteMessageChannelModel>>(requestUri, default)).ReturnsAsync(data).Verifiable();
var websiteMessageService = new Mock<WebsiteMessageService>(caller.Object);
Expand All @@ -75,7 +75,7 @@ public async Task TestGetNoticeListAsync()
{
var options = new GetNoticeListModel();
var data = new List<WebsiteMessageModel>();
var requestUri = $"api/website-message/GetNoticeList";
var requestUri = $"api/website-message/NoticeList";
var caller = new Mock<ICaller>();
caller.Setup(provider => provider.GetAsync<GetNoticeListModel, List<WebsiteMessageModel>>(requestUri, options, default)).ReturnsAsync(data).Verifiable();
var websiteMessageService = new Mock<WebsiteMessageService>(caller.Object);
Expand Down