Ajuste de bloqueo usuario y correos por area
This commit is contained in:
parent
98096604a6
commit
3166d5116f
20
Microservicios/MsUsuarios/Context/CORREOSAREAMS.cs
Normal file
20
Microservicios/MsUsuarios/Context/CORREOSAREAMS.cs
Normal file
@ -0,0 +1,20 @@
|
||||
namespace MSAdminUsuarios.Context
|
||||
{
|
||||
public class CORREOSAREAMS
|
||||
{
|
||||
/*public int NU_PK_CORA { get; set; }
|
||||
public int? NU_MODULO_CORA { get; set; }
|
||||
public int? NU_AREA_CORA { get; set; }
|
||||
public int? NU_SEDE_CORA { get; set; }
|
||||
public int? BL_ESTADO_CORA { get; set; }
|
||||
public string? TX_FKDOC_USUMS { get; set; }
|
||||
public string? TX_CORREOS_CORA { get; set; }*/
|
||||
public int NU_PK_CRRMS { get; set; }
|
||||
public string? TX_AREA_CRRMS { get; set; }
|
||||
public int? NU_FK_MS { get; set; }
|
||||
public string? TX_FKDOC_USUMS { get; set; }
|
||||
public string? TX_SEDES_CRRMS { get; set; }
|
||||
public string? TX_CORREOS_CRRMS { get; set; }
|
||||
public int? NU_ESTADO_CRRMS { get; set; }
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
namespace MSAdminUsuarios.Context
|
||||
{
|
||||
public class CorreosArea
|
||||
{
|
||||
public int NU_PK_CORA { get; set; }
|
||||
public int? NU_MODULO_CORA { get; set; }
|
||||
public int? NU_AREA_CORA { get; set; }
|
||||
public int? NU_SEDE_CORA { get; set; }
|
||||
public int? BL_ESTADO_CORA { get; set; }
|
||||
public string? TX_FKDOC_USUMS { get; set; }
|
||||
public string? TX_CORREOS_CORA { get; set; }
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ namespace MSAdminUsuarios.Context
|
||||
public virtual DbSet<PERFIL> PERFILESMs { get; set; } = null!;
|
||||
public virtual DbSet<PERFILPORUSUARIO> PERFILESPORUSUARIOs { get; set; } = null!;
|
||||
public virtual DbSet<USUARIO> USUARIOSMs { get; set; } = null!;
|
||||
public virtual DbSet<CorreosArea> CORREOSAREAMS { get; set; } = null!;
|
||||
public virtual DbSet<CORREOSAREAMS> CORREOSAREAMS { get; set; } = null!;
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
@ -97,9 +97,9 @@ namespace MSAdminUsuarios.Context
|
||||
entity.Property(e => e.CL_FIRMA_USUMS).HasColumnType("CLOB");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<CorreosArea>(entity =>
|
||||
modelBuilder.Entity<CORREOSAREAMS>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.NU_PK_CORA);
|
||||
entity.HasKey(e => e.NU_PK_CRRMS);
|
||||
|
||||
entity.ToTable("CORREOSAREAMS");
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace MSAdminUsuarios.Context
|
||||
public int? NU_GRUPO_USUMS { get; set; }
|
||||
public int? NU_CARGO_USUMS { get; set; }
|
||||
public int? NU_MODALIDADCTT_USUMS { get; set; }
|
||||
public string? TX_SEDES_USUMS { get; set; }
|
||||
|
||||
public string? TX_SEDES_USUMS { get; set; }
|
||||
public int? NU_BLOQUEO_USUMS { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace MSAdminUsuarios.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
List<CorreosArea> lista = this._context.CORREOSAREAMS.ToList();
|
||||
List<CORREOSAREAMS> lista = this._context.CORREOSAREAMS.ToList();
|
||||
|
||||
return Ok(lista);
|
||||
} catch (Exception ex)
|
||||
@ -30,7 +30,7 @@ namespace MSAdminUsuarios.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult post([FromBody] CorreosArea nuevo)
|
||||
public IActionResult post([FromBody] CORREOSAREAMS nuevo)
|
||||
{
|
||||
|
||||
try
|
||||
@ -47,12 +47,12 @@ namespace MSAdminUsuarios.Controllers
|
||||
}
|
||||
|
||||
[HttpPatch]
|
||||
public IActionResult patch([FromBody] CorreosArea actualizar)
|
||||
public IActionResult patch([FromBody] CORREOSAREAMS actualizar)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
CorreosArea? existente = this._context.CORREOSAREAMS.FirstOrDefault(c => c.NU_PK_CORA == actualizar.NU_PK_CORA);
|
||||
CORREOSAREAMS? existente = this._context.CORREOSAREAMS.FirstOrDefault(c => c.NU_PK_CRRMS == actualizar.NU_PK_CRRMS);
|
||||
if (existente == null) return BadRequest("Registro inexistente");
|
||||
|
||||
this._context.Entry(existente).CurrentValues.SetValues(actualizar);
|
||||
|
@ -60,6 +60,7 @@ namespace MSAdminUsuarios.Controllers
|
||||
var existe = _context.PERFILESMs.Find(editado.NU_PK_PFL);
|
||||
|
||||
existe.TX_PERFIL_PFL = editado.TX_PERFIL_PFL;
|
||||
existe.NU_ROL_PFL = editado.NU_ROL_PFL;
|
||||
existe.BL_ESTADO_PFL = editado.BL_ESTADO_PFL;
|
||||
|
||||
_context.PERFILESMs.Update(existe);
|
||||
|
@ -255,7 +255,7 @@ namespace MSAdminUsuarios.Controllers
|
||||
existe.NU_CARGO_USUMS = editado.NU_CARGO_USUMS;
|
||||
existe.NU_MODALIDADCTT_USUMS = editado.NU_MODALIDADCTT_USUMS;
|
||||
existe.TX_SEDES_USUMS = editado.TX_SEDES_USUMS;
|
||||
|
||||
existe.NU_BLOQUEO_USUMS = editado.NU_BLOQUEO_USUMS;
|
||||
|
||||
ErrorModel errorPFLxUSUMS = await ActualizarRelaciones(existe.TX_PKDOC_USUMS, editado.TX_PKDOC_USUMS);
|
||||
|
||||
|
@ -37,5 +37,6 @@ namespace MSAdminUsuarios.Dto
|
||||
public int? NU_CARGO_USUMS { get; set; }
|
||||
public int? NU_MODALIDADCTT_USUMS { get; set; }
|
||||
public string? TX_SEDES_USUMS { get; set; }
|
||||
public int? NU_BLOQUEO_USUMS { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -3,9 +3,9 @@
|
||||
"ConString": "user id=HIMSCAP;password=ITTASA2017;data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=181.129.245.90)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=PROYECTOS)))"
|
||||
},
|
||||
"RabbitMQConfig": {
|
||||
"HostName": "192.168.1.69",
|
||||
"UserName": "user",
|
||||
"Password": "password"
|
||||
"HostName": "localhost",
|
||||
"UserName": "guest",
|
||||
"Password": "guest"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
|
Loading…
Reference in New Issue
Block a user