- Timestamp:
- 01/06/23 19:17:05 (23 months ago)
- Branches:
- main
- Children:
- cab5859
- Parents:
- d4b888e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/autopartz/service/impl/DeliveryServiceImpl.java
rd4b888e r9dcbf44 3 3 import com.example.autopartz.model.Delivery; 4 4 import com.example.autopartz.model.Deliveryman; 5 import com.example.autopartz.model.Order; 5 6 import com.example.autopartz.repository.DeliveryRepository; 6 7 import com.example.autopartz.service.DeliveryService; … … 21 22 return deliveryRepository.findAllByDeliveryman(dm); 22 23 } 24 25 @Override 26 public Delivery findById(Integer id) { 27 return deliveryRepository.findById(id).get(); 28 } 29 30 @Override 31 public void update(Delivery d) { 32 deliveryRepository.save(d); 33 } 34 35 @Override 36 public Delivery findByOrder(Order o) { 37 return deliveryRepository.findAllByOrder(o).stream().findFirst().orElseThrow(RuntimeException::new); 38 } 23 39 }
Note:
See TracChangeset
for help on using the changeset viewer.