Merge remote-tracking branch 'origin/master'

This commit is contained in:
飞光!飞光! 2023-06-19 20:30:33 +08:00
commit 6dbd03f880

View File

@ -59,7 +59,12 @@ public class OrdersController {
List<OrdersDTO> ordersDTOS = page.getList().stream().map(ordersDTO -> { List<OrdersDTO> ordersDTOS = page.getList().stream().map(ordersDTO -> {
UserDTO userDTO = userService.get(ordersDTO.getUserId()); UserDTO userDTO = userService.get(ordersDTO.getUserId());
ordersDTO.setUserName(userDTO.getName()); if(userDTO!=null) {
ordersDTO.setUserName(userDTO.getName());
}
else {
ordersDTO.setUserName("账号已注销");
}
return ordersDTO; return ordersDTO;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
page.setList(ordersDTOS); page.setList(ordersDTOS);