diff --git a/PARR.API/Contracts/V1/ApiRoutes.cs b/PARR.API/Contracts/V1/ApiRoutes.cs index 76efd77e..802c354d 100644 --- a/PARR.API/Contracts/V1/ApiRoutes.cs +++ b/PARR.API/Contracts/V1/ApiRoutes.cs @@ -125,18 +125,22 @@ namespace PARR.API.Contracts.V1 public const string getParam = "{id}"; } + public static class User + { + public const string GetAll = Base + "/users/"; + public const string Get = Base + "/users/" + getParam; + public const string Delete = Base + "/users/" + getParam; + public const string Create = Base + "/users/"; + public const string Update = Base + "/users/" + getParam; - //public static class Layer - //{ - // public const string GetAll = Base + "/layers/"; - // public const string Get = Base + "/layers/" + getParam; + public const string getParam = "{id}"; + } - // public const string GetAreas = Base + "/layers/" + getParam + "/areas"; - // public const string GetPlaces = Base + "/layers/" + getParam + "/places"; - // public const string GetTemplates = Base + "/layers/" + getParam + "/templates"; + public static class Role + { + public const string GetAll = Base + "/roles/"; + } - // public const string getParam = "{id}"; - // } } diff --git a/PARR.API/Contracts/V1/Requests/UserRequest.cs b/PARR.API/Contracts/V1/Requests/UserRequest.cs new file mode 100644 index 00000000..7b614db4 --- /dev/null +++ b/PARR.API/Contracts/V1/Requests/UserRequest.cs @@ -0,0 +1,11 @@ +namespace PARR.API.Contracts.V1.Requests +{ + public class UserRequest + { + public required string Ip { get; set; } + + public required string Name { get; set; } + + public string Description { get; set; } = string.Empty; + } +} diff --git a/PARR.API/Contracts/V1/Responses/RoleResponse.cs b/PARR.API/Contracts/V1/Responses/RoleResponse.cs new file mode 100644 index 00000000..66229614 --- /dev/null +++ b/PARR.API/Contracts/V1/Responses/RoleResponse.cs @@ -0,0 +1,11 @@ +namespace PARR.API.Contracts.V1.Responses +{ + public class RoleResponse + { + public Guid Id { get; set; } + + public required string Name { get; set; } + + public required string Description { get; set; } + } +} diff --git a/PARR.API/Contracts/V1/Responses/UserResponse.cs b/PARR.API/Contracts/V1/Responses/UserResponse.cs new file mode 100644 index 00000000..d2821567 --- /dev/null +++ b/PARR.API/Contracts/V1/Responses/UserResponse.cs @@ -0,0 +1,17 @@ +namespace PARR.API.Contracts.V1.Responses +{ + public class UserResponse + { + public Guid Id { get; set; } + + public DateTimeOffset DateCreated { get; set; } + + public required string Ip { get; set; } + + public string Name { get; set; } = string.Empty; + + public string Description { get; set; } = string.Empty; + + public List? Roles { get; set; } + } +} diff --git a/PARR.API/Controllers/V1/RoleController.cs b/PARR.API/Controllers/V1/RoleController.cs new file mode 100644 index 00000000..144709bf --- /dev/null +++ b/PARR.API/Controllers/V1/RoleController.cs @@ -0,0 +1,44 @@ +using AutoMapper; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using PARR.API.Contracts.V1; +using PARR.API.Contracts.V1.Responses; +using PARR.API.Contracts.V1.Responses.Base; +using PARR.API.Controllers.V1.Base; +using PARR.Constants; +using PARR.DAL.Services.Interfaces; + +namespace PARR.API.Controllers.V1 +{ + [Authorize(Roles = ParrRoles.Administrator.Role)] + public class RoleController : BaseApiController + { + private readonly IRoleService roleService; + private readonly IMapper mapper; + + public RoleController( + IRoleService roleService, + IMapper mapper + ) + { + this.roleService = roleService; + this.mapper = mapper; + } + + + /// + /// Список ролей пользователей + /// + /// + [HttpGet(ApiRoutes.Role.GetAll)] + public async Task GetAll() + { + var roles = await roleService.Get().OrderBy(t => t.Description).ToListAsync(); + + var response = mapper.Map>(roles); + + return Ok(new Response>(response, true)); + } + } +} diff --git a/PARR.API/Controllers/V1/TemplateController.cs b/PARR.API/Controllers/V1/TemplateController.cs index 5c3a57b0..77a12f00 100644 --- a/PARR.API/Controllers/V1/TemplateController.cs +++ b/PARR.API/Controllers/V1/TemplateController.cs @@ -18,6 +18,9 @@ using PARR.DAL.Services.Interfaces; namespace PARR.API.Controllers.V1 { + /// + /// Шаблоны + /// [Authorize(Roles = ParrRoles.Administrator.Role)] public class TemplateController : BaseApiController { diff --git a/PARR.API/Controllers/V1/UserController.cs b/PARR.API/Controllers/V1/UserController.cs new file mode 100644 index 00000000..35097fb7 --- /dev/null +++ b/PARR.API/Controllers/V1/UserController.cs @@ -0,0 +1,183 @@ +using AutoMapper; +using FluentValidation; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using PARR.API.Contracts.V1; +using PARR.API.Contracts.V1.Requests; +using PARR.API.Contracts.V1.Requests.Queries; +using PARR.API.Contracts.V1.Responses; +using PARR.API.Contracts.V1.Responses.Base; +using PARR.API.Controllers.V1.Base; +using PARR.API.Extensions; +using PARR.API.Services.Interfaces; +using PARR.Constants; +using PARR.DAL.DomainModels; +using PARR.DAL.Models; +using PARR.DAL.Services.Interfaces; + +namespace PARR.API.Controllers.V1 +{ + /// + /// Управление пользователями + /// + [Authorize(Roles = ParrRoles.Administrator.Role)] + public class UserController : BaseApiController + { + private readonly IMapper mapper; + private readonly IUserService userService; + private readonly IValidator validator; + private readonly IUriService uriService; + + public UserController( + IMapper mapper, + IUserService userService, + IValidator validator, + IUriService uriService + ) + { + this.mapper = mapper; + this.userService = userService; + this.validator = validator; + this.uriService = uriService; + } + + /// + /// Список пользователей постранично + /// + /// + /// + [HttpGet(ApiRoutes.User.GetAll)] + public async Task GetAll([FromQuery] PaginationQuery paginationQuery) + { + var paginationFilter = mapper.Map(paginationQuery); + + IQueryable query = userService.Get() + .Include(t => t.Roles).ThenInclude(t => t.Role) + .OrderBy(t => t.Name); + + var users = await userService.GetPage(query, paginationFilter).ToListAsync(); + + if (!users.Any()) + return NoContent(); + + var userResponse = mapper.Map>(users); + var paginationResponse = new PagedResponse(userResponse, true).GetPaginatedProps(paginationFilter, query); + + return Ok(paginationResponse); + } + + + /// + /// Получить пользователя по id + /// + /// + /// + [HttpGet(ApiRoutes.User.Get)] + public async Task GetById([FromRoute] Guid id) + { + var user = await userService.Get() + .Include(t => t.Roles).ThenInclude(t => t.Role) + .FirstOrDefaultAsync(t => t.Id == id); + + if (user == null) + return NotFound(); + + var response = mapper.Map(user); + + return Ok(new Response(response, true)); + } + + + /// + /// Удалить пользователя + /// + /// + /// + [HttpDelete(ApiRoutes.User.Delete)] + public async Task Delete([FromRoute] Guid id) + { + var user = await userService.GetAsync(id); + + if (user == null) + return BadRequest(new Response(false, new List { new ErrorModel { Message = $"Ошибка при удалении пользователя. Не найден пользователь с id: {id}" } })); + + if (!userService.Delete(user) || !await userService.CommitAsync()) + return BadRequest(new Response(false, new List { new ErrorModel { Message = $"Ошибка при удалении пользователя." } })); + + return NoContent(); + } + + + /// + /// Создать пользователя + /// + /// + /// + [HttpPost(ApiRoutes.User.Create)] + public async Task Create([FromBody] UserRequest request) + { + var resultValidate = await validator.ValidateAsync(request); + if (!resultValidate.IsValid) + return BadRequest(new Response(resultValidate.Errors)); + + var existIp = await userService.Get().FirstOrDefaultAsync(t => t.Ip == request.Ip); + if (existIp != null) + return BadRequest(new Response(false, new List { new ErrorModel { FieldName = nameof(request.Ip), Message = $"Ip {request.Ip} занят другим пользователем." } })); + + var user = new User + { + Id = Guid.NewGuid(), + Ip = request.Ip, + Name = request.Name, + Description = request.Description + }; + + if (!await userService.CreateAsync(user) || !await userService.CommitAsync()) + return BadRequest(new Response(false, new List { new ErrorModel { Message = "Ошибка при создани пользователя." } })); + + var locationUri = uriService.GetUri(ApiRoutes.User.Get, ApiRoutes.User.getParam, user.Id); + + return Created(locationUri, new Response(mapper.Map(user), true)); + } + + + /// + /// Обновить пользователя + /// + /// + /// + /// + [HttpPut(ApiRoutes.User.Update)] + public async Task Update([FromRoute] Guid id, [FromBody] UserRequest request) + { + var resultValidate = await validator.ValidateAsync(request); + if (!resultValidate.IsValid) + return BadRequest(new Response(resultValidate.Errors)); + + var orig = await userService.Get() + .Include(t => t.Roles).ThenInclude(t => t.Role) + .FirstOrDefaultAsync(t => t.Id == id); + + if (orig == null) + return BadRequest(new Response(false, new List { new ErrorModel { Message = "Ошибка при изменении пользователя." } })); + + //хочет изменить свой ip + if (orig.Ip != request.Ip) + { + var existIp = await userService.Get().FirstOrDefaultAsync(t => t.Ip == request.Ip); + if (existIp != null) + return BadRequest(new Response(false, new List { new ErrorModel { FieldName = nameof(request.Ip), Message = $"Ip {request.Ip} занят другим пользователем." } })); + } + + orig.Ip = request.Ip; + orig.Name = request.Name; + orig.Description = request.Description; + + if (!await userService.CommitAsync()) + return BadRequest(new Response(false, new List { new ErrorModel { Message = "Ошибка при изменении пользователя." } })); + + return Ok(new Response(mapper.Map(orig), true)); + } + } +} diff --git a/PARR.API/MappingProfiles/DomainToResponseProfile.cs b/PARR.API/MappingProfiles/DomainToResponseProfile.cs index 14411476..0f669b94 100644 --- a/PARR.API/MappingProfiles/DomainToResponseProfile.cs +++ b/PARR.API/MappingProfiles/DomainToResponseProfile.cs @@ -64,7 +64,7 @@ namespace PARR.API.MappingProfiles CreateMap(); CreateMap() - .ForMember(d => d.Applications, o => o.MapFrom(s => s.ApplicationsInHosts.Select(t => t.Application).OrderBy(t=>t.Name))); + .ForMember(d => d.Applications, o => o.MapFrom(s => s.ApplicationsInHosts.Select(t => t.Application).OrderBy(t => t.Name))); // === Host === CreateMap(); @@ -161,6 +161,16 @@ namespace PARR.API.MappingProfiles .ForMember(t => t.Date, o => o.MapFrom(s => s.DateCreated)) .ForMember(t => t.Level, o => o.MapFrom(s => s.AgentHistoryLevel)); + + #region User + + CreateMap() + .ForMember(t => t.Roles, o => o.MapFrom(s => s.Roles.Select(t => t.Role).OrderBy(t => t!.Description))); + + CreateMap(); + + #endregion + } } } diff --git a/PARR.API/Validators/UserRequestValidator.cs b/PARR.API/Validators/UserRequestValidator.cs new file mode 100644 index 00000000..4f72479d --- /dev/null +++ b/PARR.API/Validators/UserRequestValidator.cs @@ -0,0 +1,16 @@ +using FluentValidation; +using PARR.API.Contracts.V1.Requests; + +namespace PARR.API.Validators +{ + public class UserRequestValidator : AbstractValidator + { + public UserRequestValidator() + { + RuleFor(t => t.Ip).Matches("\\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.|$)){4}\\b").WithMessage("Не является ip адресом"); + + RuleFor(t => t.Name).NotEmpty(); + + } + } +} diff --git a/PARR.DAL/ParrDalInstaller.cs b/PARR.DAL/ParrDalInstaller.cs index 4e2e79de..851fd9cc 100644 --- a/PARR.DAL/ParrDalInstaller.cs +++ b/PARR.DAL/ParrDalInstaller.cs @@ -63,7 +63,7 @@ namespace PARR.DAL services.AddTransient(); services.AddTransient(); services.AddTransient(); - + services.AddTransient(); // TransformServices services.AddTransient(); diff --git a/PARR.DAL/Services/Implementations/RoleService.cs b/PARR.DAL/Services/Implementations/RoleService.cs new file mode 100644 index 00000000..738d1f46 --- /dev/null +++ b/PARR.DAL/Services/Implementations/RoleService.cs @@ -0,0 +1,23 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Logging; +using PARR.DAL.Context; +using PARR.DAL.Models; +using PARR.DAL.Services.Abstracts; +using PARR.DAL.Services.Interfaces; + +namespace PARR.DAL.Services.Implementations +{ + internal class RoleService : BaseService, IRoleService + { + private readonly DataContext dataContext; + + public RoleService(DataContext dataContext, ILogger logger) : base(logger) + { + this.dataContext = dataContext; + } + + protected override DbSet EntitySet => dataContext.Roles; + + protected override DataContext EntitiContext => dataContext; + } +} diff --git a/PARR.DAL/Services/Interfaces/IRoleService.cs b/PARR.DAL/Services/Interfaces/IRoleService.cs new file mode 100644 index 00000000..77a57f4a --- /dev/null +++ b/PARR.DAL/Services/Interfaces/IRoleService.cs @@ -0,0 +1,9 @@ +using PARR.DAL.Models; +using PARR.DAL.Services.Interfaces.Base; + +namespace PARR.DAL.Services.Interfaces +{ + public interface IRoleService : IBaseService + { + } +} diff --git a/PARR.EsppOrderLoaderWorker/appsettings.Development.json b/PARR.EsppOrderLoaderWorker/appsettings.Development.json index b2dcdb67..25ba5027 100644 --- a/PARR.EsppOrderLoaderWorker/appsettings.Development.json +++ b/PARR.EsppOrderLoaderWorker/appsettings.Development.json @@ -1,4 +1,7 @@ { + "ConnectionStrings": { + "RedisConnection": "10.99.253.216:6379,password=ParrP@ssPtk202MMdevDvs" + }, "Logging": { "LogLevel": { "Default": "Information", diff --git a/PARR.EsppOrderLoaderWorker/appsettings.json b/PARR.EsppOrderLoaderWorker/appsettings.json index 1d9b1469..2f3af351 100644 --- a/PARR.EsppOrderLoaderWorker/appsettings.json +++ b/PARR.EsppOrderLoaderWorker/appsettings.json @@ -1,6 +1,7 @@ { "ConnectionStrings": { - "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;" + "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;", + "RedisConnection": "parr-redis:6379,password=ParrP@ssPtk202MMdevDvs" }, "Logging": { "LogLevel": { diff --git a/PARR.EsppOrderManagerWorker/appsettings.Development.json b/PARR.EsppOrderManagerWorker/appsettings.Development.json index 992d2719..bec97d50 100644 --- a/PARR.EsppOrderManagerWorker/appsettings.Development.json +++ b/PARR.EsppOrderManagerWorker/appsettings.Development.json @@ -1,4 +1,7 @@ { + "ConnectionStrings": { + "RedisConnection": "10.99.253.216:6379,password=ParrP@ssPtk202MMdevDvs" + }, "Logging": { "LogLevel": { "Default": "Information", diff --git a/PARR.EsppOrderManagerWorker/appsettings.json b/PARR.EsppOrderManagerWorker/appsettings.json index 17e99efc..accc9da2 100644 --- a/PARR.EsppOrderManagerWorker/appsettings.json +++ b/PARR.EsppOrderManagerWorker/appsettings.json @@ -1,6 +1,7 @@ { "ConnectionStrings": { - "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;" + "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;", + "RedisConnection": "parr-redis:6379,password=ParrP@ssPtk202MMdevDvs" }, "Logging": { "LogLevel": { diff --git a/PARR.EsppScheduleSyncWorker/appsettings.Development.json b/PARR.EsppScheduleSyncWorker/appsettings.Development.json index 8fe710ee..91c52de8 100644 --- a/PARR.EsppScheduleSyncWorker/appsettings.Development.json +++ b/PARR.EsppScheduleSyncWorker/appsettings.Development.json @@ -1,4 +1,7 @@ { + "ConnectionStrings": { + "RedisConnection": "10.99.253.216:6379,password=ParrP@ssPtk202MMdevDvs" + }, "Logging": { "LogLevel": { "Default": "Information", diff --git a/PARR.EsppScheduleSyncWorker/appsettings.json b/PARR.EsppScheduleSyncWorker/appsettings.json index 7ab20277..b87ba7d4 100644 --- a/PARR.EsppScheduleSyncWorker/appsettings.json +++ b/PARR.EsppScheduleSyncWorker/appsettings.json @@ -1,6 +1,7 @@ { "ConnectionStrings": { - "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;" + "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;", + "RedisConnection": "parr-redis:6379,password=ParrP@ssPtk202MMdevDvs" }, "Logging": { "LogLevel": { diff --git a/PARR.EsppTemplateSyncWorker/appsettings.Development.json b/PARR.EsppTemplateSyncWorker/appsettings.Development.json index 67e461df..f1462c38 100644 --- a/PARR.EsppTemplateSyncWorker/appsettings.Development.json +++ b/PARR.EsppTemplateSyncWorker/appsettings.Development.json @@ -1,4 +1,7 @@ { + "ConnectionStrings": { + "RedisConnection": "10.99.253.216:6379,password=ParrP@ssPtk202MMdevDvs" + }, "Logging": { "LogLevel": { "Default": "Information", diff --git a/PARR.EsppTemplateSyncWorker/appsettings.json b/PARR.EsppTemplateSyncWorker/appsettings.json index 06ca9eaf..d402b5ff 100644 --- a/PARR.EsppTemplateSyncWorker/appsettings.json +++ b/PARR.EsppTemplateSyncWorker/appsettings.json @@ -1,6 +1,7 @@ { "ConnectionStrings": { - "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;" + "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;", + "RedisConnection": "parr-redis:6379,password=ParrP@ssPtk202MMdevDvs" }, "Logging": { "LogLevel": { diff --git a/PARR.GeneratorTemplatesWorker/appsettings.Development.json b/PARR.GeneratorTemplatesWorker/appsettings.Development.json index 992d2719..bec97d50 100644 --- a/PARR.GeneratorTemplatesWorker/appsettings.Development.json +++ b/PARR.GeneratorTemplatesWorker/appsettings.Development.json @@ -1,4 +1,7 @@ { + "ConnectionStrings": { + "RedisConnection": "10.99.253.216:6379,password=ParrP@ssPtk202MMdevDvs" + }, "Logging": { "LogLevel": { "Default": "Information", diff --git a/PARR.GeneratorTemplatesWorker/appsettings.json b/PARR.GeneratorTemplatesWorker/appsettings.json index ce9fd0de..4b0ea08d 100644 --- a/PARR.GeneratorTemplatesWorker/appsettings.json +++ b/PARR.GeneratorTemplatesWorker/appsettings.json @@ -1,6 +1,7 @@ { "ConnectionStrings": { - "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;" + "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;", + "RedisConnection": "parr-redis:6379,password=ParrP@ssPtk202MMdevDvs" }, "Logging": { "LogLevel": { diff --git a/PARR.MasterWorker/appsettings.Development.json b/PARR.MasterWorker/appsettings.Development.json index 992d2719..bec97d50 100644 --- a/PARR.MasterWorker/appsettings.Development.json +++ b/PARR.MasterWorker/appsettings.Development.json @@ -1,4 +1,7 @@ { + "ConnectionStrings": { + "RedisConnection": "10.99.253.216:6379,password=ParrP@ssPtk202MMdevDvs" + }, "Logging": { "LogLevel": { "Default": "Information", diff --git a/PARR.MasterWorker/appsettings.json b/PARR.MasterWorker/appsettings.json index 76e7193a..b62a5755 100644 --- a/PARR.MasterWorker/appsettings.json +++ b/PARR.MasterWorker/appsettings.json @@ -1,6 +1,7 @@ { "ConnectionStrings": { - "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;" + "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;", + "RedisConnection": "parr-redis:6379,password=ParrP@ssPtk202MMdevDvs" }, "Logging": { "LogLevel": { diff --git a/PARR.MockData/appsettings.Development.json b/PARR.MockData/appsettings.Development.json index 9ae4bfcc..06115706 100644 --- a/PARR.MockData/appsettings.Development.json +++ b/PARR.MockData/appsettings.Development.json @@ -1,6 +1,7 @@ { "ConnectionStrings": { - "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;" + "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;", + "RedisConnection": "10.99.253.216:6379,password=ParrP@ssPtk202MMdevDvs" }, "Logging": { "LogLevel": { diff --git a/PARR.MockData/appsettings.json b/PARR.MockData/appsettings.json index 423c1e33..cf6ae0d0 100644 --- a/PARR.MockData/appsettings.json +++ b/PARR.MockData/appsettings.json @@ -1,6 +1,7 @@ { "ConnectionStrings": { - "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;" + "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;", + "RedisConnection": "parr-redis:6379,password=ParrP@ssPtk202MMdevDvs" }, "Logging": { "LogLevel": { diff --git a/PARR.Worker/PARR.Worker/appsettings.Development.json b/PARR.Worker/PARR.Worker/appsettings.Development.json index 79e11ad3..5f5524c7 100644 --- a/PARR.Worker/PARR.Worker/appsettings.Development.json +++ b/PARR.Worker/PARR.Worker/appsettings.Development.json @@ -1,7 +1,8 @@ { "ConnectionStrings": { "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;", - "AihitConnection": "Data Source=10.248.19.97; Initial Catalog=mao2;User ID=awhit-ipp-parr;pwd=ET3h$9y1LH#D;TrustServerCertificate=true;" + "AihitConnection": "Data Source=10.248.19.97; Initial Catalog=mao2;User ID=awhit-ipp-parr;pwd=ET3h$9y1LH#D;TrustServerCertificate=true;", + "RedisConnection": "10.99.253.216:6379,password=ParrP@ssPtk202MMdevDvs" }, "Logging": { "LogLevel": { diff --git a/PARR.Worker/PARR.Worker/appsettings.json b/PARR.Worker/PARR.Worker/appsettings.json index e986dbf1..1fc180c8 100644 --- a/PARR.Worker/PARR.Worker/appsettings.json +++ b/PARR.Worker/PARR.Worker/appsettings.json @@ -1,7 +1,8 @@ { "ConnectionStrings": { "DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;", - "AihitConnection": "Data Source=10.248.19.97; Initial Catalog=mao2;User ID=awhit-ipp-parr;pwd=ET3h$9y1LH#D;TrustServerCertificate=true;" + "AihitConnection": "Data Source=10.248.19.97; Initial Catalog=mao2;User ID=awhit-ipp-parr;pwd=ET3h$9y1LH#D;TrustServerCertificate=true;", + "RedisConnection": "parr-redis:6379,password=ParrP@ssPtk202MMdevDvs" }, "Logging": { "LogLevel": {