Line | |
---|
1 | package com.example.cookbook.service.impl;
|
---|
2 |
|
---|
3 |
|
---|
4 | import com.example.cookbook.model.DostavaDTO;
|
---|
5 | import com.example.cookbook.model.Naracka;
|
---|
6 | import com.example.cookbook.model.Recept;
|
---|
7 | import com.example.cookbook.model.Stavka;
|
---|
8 | import com.example.cookbook.repository.NarackiRepository;
|
---|
9 | import com.example.cookbook.service.NarackiService;
|
---|
10 | import org.springframework.stereotype.Service;
|
---|
11 |
|
---|
12 | import java.sql.SQLException;
|
---|
13 | import java.time.LocalDateTime;
|
---|
14 | import java.util.List;
|
---|
15 |
|
---|
16 | @Service
|
---|
17 | public class NarackiServiceImpl implements NarackiService {
|
---|
18 |
|
---|
19 | private final NarackiRepository narackiRepository;
|
---|
20 |
|
---|
21 | public NarackiServiceImpl(NarackiRepository narackiRepository) {
|
---|
22 | this.narackiRepository = narackiRepository;
|
---|
23 | }
|
---|
24 |
|
---|
25 | @Override
|
---|
26 | public List<Naracka> listAll() throws SQLException {
|
---|
27 | return narackiRepository.findAll();
|
---|
28 | }
|
---|
29 |
|
---|
30 | @Override
|
---|
31 | public List<Stavka> findByTelAndVreme(String telefon, LocalDateTime vreme) throws SQLException {
|
---|
32 | return narackiRepository.findByTelAndVreme(telefon, vreme);
|
---|
33 | }
|
---|
34 |
|
---|
35 | @Override
|
---|
36 | public List<DostavaDTO> findDataForDostava(String telefon, LocalDateTime vreme) throws SQLException {
|
---|
37 | return narackiRepository.findDataForDostava(telefon, vreme);
|
---|
38 | }
|
---|
39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.