Changeset 60e9cc1 for src/main/java/com
- Timestamp:
- 03/06/23 19:01:32 (21 months ago)
- Branches:
- main
- Children:
- c79897f
- Parents:
- bba352b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/autopartz/controller/HomeController.java
rbba352b r60e9cc1 20 20 import java.io.IOException; 21 21 import java.util.ArrayList; 22 import java.util.Comparator; 22 23 import java.util.List; 23 24 import java.util.Objects; 25 import java.util.stream.Collectors; 24 26 25 27 @Controller … … 220 222 Deliveryman dm = (Deliveryman) userService.findByUsername(request.getRemoteUser()); 221 223 List<Delivery> deliveries = deliveryService.findAllByDeliverer(dm); 224 deliveries = deliveries.stream().sorted((p1,p2)->p2.getOrder().getDate().compareTo(p1.getOrder().getDate())).collect(Collectors.toList()); 222 225 model.addAttribute("bodyContent","myDeliveries"); 223 226 model.addAttribute("deliveries",deliveries);
Note:
See TracChangeset
for help on using the changeset viewer.