feat(dal,api): добавлен индекс в таблицу UnitInValues. В api изменены респонсы Template и Unit.

This commit is contained in:
Mikhail Trubnikov
2025-11-21 10:56:30 +10:00
parent 240d292cee
commit ddbae48973
11 changed files with 4063 additions and 23 deletions

View File

@@ -249,9 +249,9 @@ namespace PARR.API.Controllers.V1
changed = true;
}
if (orig.IsParentRelationships != request.isParentRelationships)
if (orig.IsParentRelationships != request.IsParentRelationships)
{
orig.IsParentRelationships = request.isParentRelationships;
orig.IsParentRelationships = request.IsParentRelationships;
changed = true;
}

View File

@@ -62,8 +62,11 @@ namespace PARR.API.Controllers.V1
if (!units.Any())
return NoContent();
var unitResponse = mapper.Map<List<UnitWithAttributesResponse>>(units);
var paginationResponse = new PagedResponse<UnitWithAttributesResponse>(unitResponse, true).GetPaginatedProps(paginationFilter, query);
//var unitResponse = mapper.Map<List<UnitWithAttributesResponse>>(units);
//var paginationResponse = new PagedResponse<UnitWithAttributesResponse>(unitResponse, true).GetPaginatedProps(paginationFilter, query);
var unitResponse = mapper.Map<List<UnitRelationshipsAndAttributesResponse>>(units);
var paginationResponse = new PagedResponse<UnitRelationshipsAndAttributesResponse>(unitResponse, true).GetPaginatedProps(paginationFilter, query);
return Ok(paginationResponse);
}
@@ -89,9 +92,13 @@ namespace PARR.API.Controllers.V1
if (unit == null)
return NotFound();
var response = mapper.Map<UnitWithAttributesResponse>(unit);
//var response = mapper.Map<UnitWithAttributesResponse>(unit);
return Ok(new Response<UnitWithAttributesResponse>(response, true));
//return Ok(new Response<UnitWithAttributesResponse>(response, true));
var response = mapper.Map<UnitRelationshipsAndAttributesResponse>(unit);
return Ok(new Response<UnitRelationshipsAndAttributesResponse>(response, true));
}