Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatIgnatov committed Apr 25, 2024
1 parent ebc6e45 commit 74b9b88
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import jakarta.transaction.Transactional;
import java.util.List;
import java.util.UUID;
import jewellery.inventory.aspect.EntityFetcher;
import jewellery.inventory.aspect.annotation.LogCreateEvent;
import jewellery.inventory.dto.request.PurchasedResourceQuantityRequestDto;
import jewellery.inventory.dto.request.SaleRequestDto;
Expand All @@ -22,7 +21,7 @@

@Service
@RequiredArgsConstructor
public class OrganizationSaleService implements EntityFetcher {
public class OrganizationSaleService {

private static final Logger logger = LogManager.getLogger(OrganizationSaleService.class);

Expand Down Expand Up @@ -210,13 +209,4 @@ private void throwExceptionIfResourceIsNotOwned(SaleRequestDto saleRequestDto) {
}
}
}

@Override
public Object fetchEntity(Object... ids) {
Sale sale = saleRepository.findById((UUID) ids[0]).orElse(null);
if (sale == null) {
return null;
}
return saleMapper.mamToOrganizationSaleResponseDto(sale);
}
}

0 comments on commit 74b9b88

Please sign in to comment.