Rev 760 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 760 | Rev 761 | ||
|---|---|---|---|
| Line 2... | Line 2... | ||
| 2 | 2 | ||
| 3 | import java.time.LocalDateTime; |
3 | import java.time.LocalDateTime; |
| - | 4 | import java.util.List; |
|
| 4 | 5 | ||
| 5 | import org.springframework.beans.factory.annotation.Autowired; |
6 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | import org.springframework.stereotype.Service; |
7 | import org.springframework.stereotype.Service; |
| 7 | 8 | ||
| 8 | import br.com.ec.core.generic.AbstractService; |
9 | import br.com.ec.core.generic.AbstractService; |
| Line 37... | Line 38... | ||
| 37 | @Override |
38 | @Override |
| 38 | public void cadastrar(String ativo, LocalDateTime inicioCandle, LocalDateTime fimCandle, CandleState situacaoCandle) { |
39 | public void cadastrar(String ativo, LocalDateTime inicioCandle, LocalDateTime fimCandle, CandleState situacaoCandle) { |
| 39 | Ativo ativoConsultado = ativoService.consultarPorDescricao(ativo); |
40 | Ativo ativoConsultado = ativoService.consultarPorDescricao(ativo); |
| 40 | Candle candle = new Candle(ativoConsultado, fimCandle, situacaoCandle, TipoPeriodoCandle.M1.getValor()); |
41 | Candle candle = new Candle(ativoConsultado, fimCandle, situacaoCandle, TipoPeriodoCandle.M1.getValor()); |
| 41 | candleRepository.cadastrar(candle); |
42 | candleRepository.cadastrar(candle); |
| - | 43 | }
|
|
| - | 44 | ||
| - | 45 | @Override |
|
| - | 46 | public List<Candle> consultarAtivosComCandleEncerradoAte(LocalDateTime fimUltimoCandle) { |
|
| - | 47 | return candleRepository.consultarAtivosComCandleEncerradoAte(fimUltimoCandle); |
|
| 42 | }
|
48 | }
|
| 43 | 49 | ||
| 44 | }
|
50 | }
|