Legend:
- Unmodified
- Added
- Removed
-
src/main/java/project/fmo/app/projcetfmo/Service/impl/DostavaServiceImpl.java
r1dd9226 rd14176d 1 package project.fmo.app.projcetfmo.Service.impl;public class DostavaServiceImpl { 1 package project.fmo.app.projcetfmo.Service.impl; 2 3 import org.springframework.stereotype.Service; 4 import project.fmo.app.projcetfmo.Model.Dostava; 5 import project.fmo.app.projcetfmo.Model.Dostavuvac; 6 import project.fmo.app.projcetfmo.Repository.DostavaRepository; 7 import project.fmo.app.projcetfmo.Service.DostavaService; 8 9 import java.util.List; 10 11 @Service 12 public class DostavaServiceImpl implements DostavaService { 13 14 private final DostavaRepository dostavaRepository; 15 16 public DostavaServiceImpl(DostavaRepository dostavaRepository) { 17 this.dostavaRepository = dostavaRepository; 18 } 19 20 @Override 21 public List<Dostava> findByIdKorisnikAndStatus(Dostavuvac dostavuvac, String status) { 22 return dostavaRepository.findByDostavuvacAndStatus(dostavuvac,status); 23 } 24 25 @Override 26 public Dostava edit(Integer id) { 27 Dostava d = dostavaRepository.findById(id).orElse(null); 28 assert d != null; 29 d.setStatus("dostavena"); 30 dostavaRepository.save(d); 31 return d; 32 } 2 33 }
Note:
See TracChangeset
for help on using the changeset viewer.