From fd1f05001eb1f2b029a768fe4ced821b07a4fd69 Mon Sep 17 00:00:00 2001 From: mlf9527 <2192316287@qq.com> Date: Mon, 19 Jun 2023 19:45:37 +0800 Subject: [PATCH] =?UTF-8?q?6/19=20=E5=AE=8C=E5=96=84=E4=BA=86=E5=AF=B9?= =?UTF-8?q?=E6=B3=A8=E9=94=80=E7=94=A8=E6=88=B7=E7=9A=84=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/takeout/controller/OrdersController.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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);