refactor(CountHistoryQuery): replace single status filter with status range in CountHistoryQuery
- Updated AnyHistoryAsync extension to use EnvelopeStatusQuery instead of single EnvelopeStatus. - Modified CountHistoryQuery to support multiple statuses (Min, Max, Include, Ignore). - Preserved backward compatibility with obsolete single Status and EnvelopeId.
This commit is contained in:
parent
637b45efe0
commit
b9c86ce3c6
@ -23,17 +23,15 @@ public static class CountHistoryQueryExtensions
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="uuid"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <param name="statuses"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<bool> AnyHistoryAsync(this ISender sender, string uuid, EnvelopeStatus status, CancellationToken cancel = default)
|
||||
public static async Task<bool> AnyHistoryAsync(this ISender sender, string uuid, EnvelopeStatusQuery statuses, CancellationToken cancel = default)
|
||||
{
|
||||
var count = await sender.Send(new CountHistoryQuery
|
||||
{
|
||||
Envelope = new() { Uuid = uuid },
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
Status = status,
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
Statuses = statuses
|
||||
}, cancel);
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user