source: src/main/java/com/example/cookbook/service/impl/NarackiServiceImpl.java

Last change on this file was a226bc3, checked in by Blazho <aleksandar.blazhevski@…>, 9 months ago

Vraboteniot ja planira dostavata na narackata(https://develop.finki.ukim.mk/projects/cbdb/wiki/useCase10)

  • Property mode set to 100644
File size: 1.2 KB
Line 
1package com.example.cookbook.service.impl;
2
3
4import com.example.cookbook.model.DostavaDTO;
5import com.example.cookbook.model.Naracka;
6import com.example.cookbook.model.Recept;
7import com.example.cookbook.model.Stavka;
8import com.example.cookbook.repository.NarackiRepository;
9import com.example.cookbook.service.NarackiService;
10import org.springframework.stereotype.Service;
11
12import java.sql.SQLException;
13import java.time.LocalDateTime;
14import java.util.List;
15
16@Service
17public 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.