diff --git a/renren-admin/src/main/java/io/renren/modules/takeout/controller/OrdersController.java b/renren-admin/src/main/java/io/renren/modules/takeout/controller/OrdersController.java index b68abb6..38d4664 100644 --- a/renren-admin/src/main/java/io/renren/modules/takeout/controller/OrdersController.java +++ b/renren-admin/src/main/java/io/renren/modules/takeout/controller/OrdersController.java @@ -59,7 +59,12 @@ public class OrdersController { List ordersDTOS = page.getList().stream().map(ordersDTO -> { UserDTO userDTO = userService.get(ordersDTO.getUserId()); - ordersDTO.setUserName(userDTO.getName()); + if(userDTO!=null) { + ordersDTO.setUserName(userDTO.getName()); + } + else { + ordersDTO.setUserName("账号已注销"); + } return ordersDTO; }).collect(Collectors.toList()); page.setList(ordersDTOS);