@@ -90,7 +90,6 @@ public List<AlunoListaEsperaDTO> buscarAlunosListaEspera(int numeroPagina, int q
9090 return alunos .subList (inicio , fim );
9191 }
9292
93- // Registra um aluno na lista de espera
9493 public AlunoListaEsperaDTO registrarAlunosListaEspera (AlunoListaEsperaDTO alunoListaEspera ) {
9594 eExistente (alunoListaEspera .getEmail (), alunoListaEspera .getTelefone ());
9695
@@ -118,7 +117,6 @@ public void excluirAlunoListaEspera(UUID id) {
118117 reordenarListaEspera .reordenar (aluno .getId ());
119118 }
120119
121- // Retorna todos os alunos já cadastrados na academia
122120 @ Cacheable ("alunosEfetivados" )
123121 public List <AlunoEfetivadoDTO > buscarAlunosEfetivados (int numeroPagina , int quantidade , String turno , Status status ) {
124122 var pageable = PageRequest .of (numeroPagina , quantidade );
@@ -182,7 +180,6 @@ public void registarAlunoStatusPendente(UUID id, AlunoDTO alunoDTO) {
182180 alunoRepository .save (aluno );
183181 }
184182
185- // Remove aluno cadastrado
186183 public void excluirAlunoEfetivado (UUID id ) {
187184 var aluno = buscarPorId (id );
188185
@@ -195,7 +192,6 @@ public void excluirAlunoEfetivado(UUID id) {
195192 alunoRepository .deleteById (aluno .getId ());
196193 }
197194
198- // Atualiza os dados do aluno cadastrado
199195 public AlunoDTO atualizarEfetivado (UUID id , AtualizarAlunoDTO alunoDTO ) {
200196 var dto = mapper .map (alunoDTO , AlunoDTO .class );
201197 eExistente (dto , id );
@@ -205,7 +201,6 @@ public AlunoDTO atualizarEfetivado(UUID id, AtualizarAlunoDTO alunoDTO) {
205201 return mapper .map (aluno , AlunoDTO .class );
206202 }
207203
208- // @Transactional
209204 public AlunoDTO buscarPorId (UUID id ) {
210205 return alunoRepository .findById (id )
211206 .map (aluno -> mapper .map (aluno , AlunoDTO .class ))
@@ -232,7 +227,6 @@ public void adicionarAtestado(MultipartFile atestado, UUID id) {
232227 eventPublisher .publishEvent (new RealizarUploadAtestadoS3Event (atestado , id ));
233228 }
234229
235- // Verifica a existência de email ao cadastrar um aluno na lista de espera
236230 private void eExistente (String email , String telefone ) {
237231 if (alunoRepository .buscarPorEmail (email ).isPresent ())
238232 throw new EmailAlreadyRegisteredException ("Email já cadastrado" );
0 commit comments