- Timestamp:
- 02/18/24 22:01:54 (9 months ago)
- Branches:
- master
- Children:
- 4251327
- Parents:
- bde8b13
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/mk/ukim/finki/busngo/service/impl/KaznaServiceImpl.java
rbde8b13 re272096 8 8 import org.springframework.stereotype.Service; 9 9 10 import java.sql.Timestamp; 11 import java.time.LocalDateTime; 10 12 import java.util.List; 11 13 … … 30 32 return kaznaRepository.findAllByKontroliByKontrolaId(kontroli); 31 33 } 34 35 @Override 36 public Kazna pay(Long kaznaId) { 37 Kazna kazna = this.findById(kaznaId); 38 kazna.setKzPlateno(true); 39 kazna.setKzDatumPlateno(Timestamp.valueOf(LocalDateTime.now())); 40 return kaznaRepository.save(kazna); 41 } 42 43 @Override 44 public Kazna findById(Long id) { 45 return kaznaRepository.findById(id).orElseThrow(RuntimeException::new); 46 } 32 47 }
Note:
See TracChangeset
for help on using the changeset viewer.