diff --git a/Persistence.Client/Clients/ChangeLogClient.cs b/Persistence.Client/Clients/ChangeLogClient.cs index 00aee71..9cca749 100644 --- a/Persistence.Client/Clients/ChangeLogClient.cs +++ b/Persistence.Client/Clients/ChangeLogClient.cs @@ -14,7 +14,7 @@ public class ChangeLogClient : BaseClient, IChangeLogClient this.refitChangeLogClient = refitChangeLogClient; } - public async Task ClearAndAddRange(Guid idDiscriminator, IEnumerable dtos, CancellationToken token) + public async Task ClearAndAddRange(int idDiscriminator, IEnumerable dtos, CancellationToken token) { var result = await ExecuteGetResponse( async () => await refitChangeLogClient.ClearAndAddRange(idDiscriminator, dtos, token), token); @@ -22,7 +22,7 @@ public class ChangeLogClient : BaseClient, IChangeLogClient return result; } - public async Task> GetByDate(Guid idDiscriminator, DateTimeOffset moment, + public async Task> GetByDate(int idDiscriminator, DateTimeOffset moment, SectionPartRequest filterRequest, PaginationRequest paginationRequest, CancellationToken token) { var result = await ExecuteGetResponse>( @@ -31,7 +31,7 @@ public class ChangeLogClient : BaseClient, IChangeLogClient return result; } - public async Task> GetChangeLogForInterval(Guid idDiscriminator, DateTimeOffset dateBegin, DateTimeOffset dateEnd, CancellationToken token) + public async Task> GetChangeLogForInterval(int idDiscriminator, DateTimeOffset dateBegin, DateTimeOffset dateEnd, CancellationToken token) { var result = await ExecuteGetResponse>( async () => await refitChangeLogClient.GetChangeLogForInterval(idDiscriminator, dateBegin, dateEnd, token), token); @@ -39,7 +39,7 @@ public class ChangeLogClient : BaseClient, IChangeLogClient return result; } - public async Task Add(Guid idDiscriminator, DataWithWellDepthAndSectionDto dto, CancellationToken token) + public async Task Add(int idDiscriminator, DataWithWellDepthAndSectionDto dto, CancellationToken token) { var result = await ExecutePostResponse( async () => await refitChangeLogClient.Add(idDiscriminator, dto, token), token); @@ -47,7 +47,7 @@ public class ChangeLogClient : BaseClient, IChangeLogClient return result; } - public async Task AddRange(Guid idDiscriminator, IEnumerable dtos, CancellationToken token) + public async Task AddRange(int idDiscriminator, IEnumerable dtos, CancellationToken token) { var result = await ExecutePostResponse( async () => await refitChangeLogClient.AddRange(idDiscriminator, dtos, token), token); @@ -87,7 +87,7 @@ public class ChangeLogClient : BaseClient, IChangeLogClient return result; } - public async Task GetDatesRange(Guid idDiscriminator, CancellationToken token) + public async Task GetDatesRange(int idDiscriminator, CancellationToken token) { var result = await ExecuteGetResponse( async () => await refitChangeLogClient.GetDatesRange(idDiscriminator, token), token); diff --git a/Persistence.Client/Clients/Interfaces/IChangeLogClient.cs b/Persistence.Client/Clients/Interfaces/IChangeLogClient.cs index 0d24585..501f763 100644 --- a/Persistence.Client/Clients/Interfaces/IChangeLogClient.cs +++ b/Persistence.Client/Clients/Interfaces/IChangeLogClient.cs @@ -15,7 +15,7 @@ public interface IChangeLogClient : IDisposable /// /// /// - Task Add(Guid idDiscriminator, DataWithWellDepthAndSectionDto dto, CancellationToken token); + Task Add(int idDiscriminator, DataWithWellDepthAndSectionDto dto, CancellationToken token); /// /// Добавить несколько записей @@ -24,7 +24,7 @@ public interface IChangeLogClient : IDisposable /// /// /// - Task AddRange(Guid idDiscriminator, IEnumerable dtos, CancellationToken token); + Task AddRange(int idDiscriminator, IEnumerable dtos, CancellationToken token); /// /// Импорт с заменой: удаление старых строк и добавление новых @@ -33,7 +33,7 @@ public interface IChangeLogClient : IDisposable /// /// /// - Task ClearAndAddRange(Guid idDiscriminator, IEnumerable dtos, CancellationToken token); + Task ClearAndAddRange(int idDiscriminator, IEnumerable dtos, CancellationToken token); /// /// Удалить одну запись @@ -60,7 +60,7 @@ public interface IChangeLogClient : IDisposable /// /// /// - Task> GetByDate(Guid idDiscriminator, DateTimeOffset moment, SectionPartRequest filterRequest, PaginationRequest paginationRequest, CancellationToken token); + Task> GetByDate(int idDiscriminator, DateTimeOffset moment, SectionPartRequest filterRequest, PaginationRequest paginationRequest, CancellationToken token); /// /// Получение исторических данных за определенный период времени @@ -70,7 +70,7 @@ public interface IChangeLogClient : IDisposable /// /// /// - Task> GetChangeLogForInterval(Guid idDiscriminator, DateTimeOffset dateBegin, DateTimeOffset dateEnd, CancellationToken token); + Task> GetChangeLogForInterval(int idDiscriminator, DateTimeOffset dateBegin, DateTimeOffset dateEnd, CancellationToken token); /// /// Получение списка дат, в которые происходили изменения (день, месяц, год, без времени) @@ -78,7 +78,7 @@ public interface IChangeLogClient : IDisposable /// /// /// - Task GetDatesRange(Guid idDiscriminator, CancellationToken token); + Task GetDatesRange(int idDiscriminator, CancellationToken token); /// /// Обновить одну запись diff --git a/Persistence.Client/Clients/Interfaces/Refit/IRefitChangeLogClient.cs b/Persistence.Client/Clients/Interfaces/Refit/IRefitChangeLogClient.cs index 8408d7e..a6ab9f6 100644 --- a/Persistence.Client/Clients/Interfaces/Refit/IRefitChangeLogClient.cs +++ b/Persistence.Client/Clients/Interfaces/Refit/IRefitChangeLogClient.cs @@ -9,24 +9,24 @@ public interface IRefitChangeLogClient : IDisposable private const string BaseRoute = "/api/ChangeLog"; [Post($"{BaseRoute}/replace/{{idDiscriminator}}")] - Task> ClearAndAddRange(Guid idDiscriminator, IEnumerable dtos, CancellationToken token); + Task> ClearAndAddRange(int idDiscriminator, IEnumerable dtos, CancellationToken token); [Get($"{BaseRoute}/moment/{{idDiscriminator}}")] Task>> GetByDate( - Guid idDiscriminator, + int idDiscriminator, DateTimeOffset moment, [Query] SectionPartRequest filterRequest, [Query] PaginationRequest paginationRequest, CancellationToken token); [Get($"{BaseRoute}/history/{{idDiscriminator}}")] - Task>> GetChangeLogForInterval(Guid idDiscriminator, DateTimeOffset dateBegin, DateTimeOffset dateEnd, CancellationToken token); + Task>> GetChangeLogForInterval(int idDiscriminator, DateTimeOffset dateBegin, DateTimeOffset dateEnd, CancellationToken token); [Post($"{BaseRoute}/{{idDiscriminator}}")] - Task> Add(Guid idDiscriminator, DataWithWellDepthAndSectionDto dto, CancellationToken token); + Task> Add(int idDiscriminator, DataWithWellDepthAndSectionDto dto, CancellationToken token); [Post($"{BaseRoute}/range/{{idDiscriminator}}")] - Task> AddRange(Guid idDiscriminator, IEnumerable dtos, CancellationToken token); + Task> AddRange(int idDiscriminator, IEnumerable dtos, CancellationToken token); [Put($"{BaseRoute}")] Task> Update(DataWithWellDepthAndSectionDto dto, CancellationToken token); @@ -41,6 +41,6 @@ public interface IRefitChangeLogClient : IDisposable Task> DeleteRange([Body] IEnumerable ids, CancellationToken token); [Get($"{BaseRoute}/datesRange/{{idDiscriminator}}")] - Task> GetDatesRange(Guid idDiscriminator, CancellationToken token); + Task> GetDatesRange(int idDiscriminator, CancellationToken token); }