Rev 530 | Rev 533 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 530 | Rev 531 | ||
|---|---|---|---|
| Line 11... | Line 11... | ||
| 11 | import org.springframework.stereotype.Service; |
11 | import org.springframework.stereotype.Service; |
| 12 | 12 | ||
| 13 | import br.com.ec.core.generic.AbstractService; |
13 | import br.com.ec.core.generic.AbstractService; |
| 14 | import br.com.ec.core.generic.GenericRepository; |
14 | import br.com.ec.core.generic.GenericRepository; |
| 15 | import br.com.ec.core.util.ArquivoUtil; |
15 | import br.com.ec.core.util.ArquivoUtil; |
| - | 16 | import br.com.ec.core.util.StringUtil; |
|
| 16 | import br.com.ec.core.validador.Validador; |
17 | import br.com.ec.core.validador.Validador; |
| 17 | import br.com.ec.domain.dto.ImagemDTO; |
18 | import br.com.ec.domain.dto.ImagemDTO; |
| 18 | import br.com.ec.domain.service.ImagemService; |
19 | import br.com.ec.domain.service.ImagemService; |
| 19 | import br.com.ec.domain.shared.ConstantesSEC; |
20 | import br.com.ec.domain.shared.ConstantesSEC; |
| 20 | 21 | ||
| Line 72... | Line 73... | ||
| 72 | 73 | ||
| 73 | /*****************************************/
|
74 | /*****************************************/
|
| 74 | 75 | ||
| 75 | @Override |
76 | @Override |
| 76 | public String retornarCaminhoImagem(String pasta, String nomeArquivo, String extensaoArquivo) { |
77 | public String retornarCaminhoImagem(String pasta, String nomeArquivo, String extensaoArquivo) { |
| 77 | File foto = new File(pasta + nomeArquivo + "." + extensaoArquivo); |
- | |
| 78 | return foto.exists()? pasta + nomeArquivo + "." + extensaoArquivo : pasta + "SEM_IMAGEM.png"; |
- | |
| - | 78 | File foto = new File(pasta + nomeArquivo + "." + StringUtil.setarLowerCase(extensaoArquivo)); |
|
| - | 79 | return foto.exists()? pasta + nomeArquivo + "." + StringUtil.setarLowerCase(extensaoArquivo) : pasta + "SEM_IMAGEM.png"; |
|
| 79 | }
|
80 | }
|
| 80 | 81 | ||
| 81 | @Override |
82 | @Override |
| 82 | public ImagemDTO uploadImagem(UploadedFile e, String nomeArquivo, String caminhoPasta) { |
83 | public ImagemDTO uploadImagem(UploadedFile e, String nomeArquivo, String caminhoPasta) { |
| 83 | ImagemDTO imagemAdicionada = gerarArquivo(e, nomeArquivo); |
84 | ImagemDTO imagemAdicionada = gerarArquivo(e, nomeArquivo); |