Skip to content

Commit

Permalink
[MODAUD-174] - Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
azizbekxm committed Nov 15, 2023
1 parent fda19eb commit 3881bdc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private OrderAuditEventCollection mapRowToListOfOrderEvent(RowSet<Row> rowSet) {
orderAuditEventCollection.getOrderAuditEvents().add(mapRowToOrderEvent(row));
orderAuditEventCollection.setTotalItems(row.getInteger(TOTAL_RECORDS_FIELD));
});
LOGGER.info("mapRowToListOfOrderEvent:: Mapped row to List of Order Events");
LOGGER.debug("mapRowToListOfOrderEvent:: Mapped row to List of Order Events");
return orderAuditEventCollection;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private OrderLineAuditEventCollection mapRowToListOfOrderLineEvent(RowSet<Row> r
orderLineAuditEventCollection.getOrderLineAuditEvents().add(mapRowToOrderLineEvent(row));
orderLineAuditEventCollection.setTotalItems(row.getInteger(TOTAL_RECORDS_FIELD));
});
LOGGER.info("mapRowToListOfOrderLineEvent:: Mapped row to List of Order Line Events");
LOGGER.debug("mapRowToListOfOrderLineEvent:: Mapped row to List of Order Line Events");
return orderLineAuditEventCollection;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private PieceAuditEventCollection mapRowToListOfPieceEvent(RowSet<Row> rowSet) {
pieceAuditEventCollection.getPieceAuditEvents().add(mapRowToPieceEvent(row));
pieceAuditEventCollection.setTotalItems(row.getInteger(TOTAL_RECORDS_FIELD));
});
LOGGER.info("mapRowToListOfOrderEvent:: Mapped row to List of Piece Events");
LOGGER.debug("mapRowToListOfOrderEvent:: Mapped row to List of Piece Events");
return pieceAuditEventCollection;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public void getAuditDataAcquisitionOrderById(String orderId, String sortBy, Audi
int limit, int offset, Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
LOGGER.debug("getAuditDataAcquisitionOrderById:: Retrieving Audit Data Acquisition Order By Id : {}", orderId);
String tenantId = TenantTool.tenantId(okapiHeaders);

try {
orderAuditEventsService.getAuditEventsByOrderId(orderId, sortBy, sortOrder.name(), limit, offset, tenantId)
.map(GetAuditDataAcquisitionOrderByIdResponse::respond200WithApplicationJson)
Expand All @@ -63,7 +62,6 @@ public void getAuditDataAcquisitionOrderLineById(String orderLineId, String sort
int limit, int offset, Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
LOGGER.debug("getAuditDataAcquisitionOrderLineById:: Retrieving Audit Data Acquisition Order Line By Id : {}", orderLineId);
String tenantId = TenantTool.tenantId(okapiHeaders);

try {
orderLineAuditEventsService.getAuditEventsByOrderLineId(orderLineId, sortBy, sortOrder.name(), limit, offset, tenantId)
.map(GetAuditDataAcquisitionOrderLineByIdResponse::respond200WithApplicationJson)
Expand All @@ -82,7 +80,6 @@ public void getAuditDataAcquisitionPieceById(String pieceId, String sortBy, Audi
int limit, int offset, Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
LOGGER.debug("getAuditDataAcquisitionOrderById:: Retrieving Audit Data Acquisition Piece By Id : {}", pieceId);
String tenantId = TenantTool.tenantId(okapiHeaders);

try {
pieceAuditEventsService.getAuditEventsByPieceId(pieceId, sortBy, sortOrder.name(), limit, offset, tenantId)
.map(GetAuditDataAcquisitionPieceByIdResponse::respond200WithApplicationJson)
Expand All @@ -99,11 +96,9 @@ public void getAuditDataAcquisitionPieceById(String pieceId, String sortBy, Audi
public void getAuditDataAcquisitionPieceStatusChangeHistoryById(String pieceId, String sortBy,
AuditDataAcquisitionPieceIdStatusChangeHistoryGetSortOrder sortOrder,
int limit, int offset, Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
LOGGER.debug("getAuditDataAcquisitionOrderById:: Retrieving Audit Data Acquisition Piece with unique status By Id : {}", pieceId);
LOGGER.debug("getAuditDataAcquisitionOrderById:: Retrieving Audit Data Acquisition Piece with status changes By Id : {}", pieceId);
String tenantId = TenantTool.tenantId(okapiHeaders);

try {
LOGGER.warn("Trying to get piece audit events with unique status by piece id: {}", pieceId);
pieceAuditEventsService.getAuditEventsWithStatusChangesByPieceId(pieceId, sortBy, sortOrder.name(), limit, offset, tenantId)
.map(GetAuditDataAcquisitionPieceByIdResponse::respond200WithApplicationJson)
.map(Response.class::cast)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void shouldReturnPieceEventsOnGetByPieceId() {
}

@Test
void shouldReturnPieceEventsStatusChangeHistoryGetByPieceId() {
void shouldReturnPieceEventsStatusChangesHistoryGetByPieceId() {
String id1 = UUID.randomUUID().toString();
String id2 = UUID.randomUUID().toString();
String id3 = UUID.randomUUID().toString();
Expand Down

0 comments on commit 3881bdc

Please sign in to comment.