From 45ca8c2ea68029ed983ce9cb151b8accbab24162 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 28 Jul 2021 17:05:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/CustomerFootBarController.java | 7 ++++--- .../service/impl/CustomerFootBarServiceImpl.java | 12 +++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java index ee7f82c6ba..9013c066fd 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java @@ -166,11 +166,12 @@ public class CustomerFootBarController { List footbars = customerFootBarService.listAllCustomerFootBars(customerId, appType); List barDTOS = new LinkedList<>(); footbars.forEach(barEntity -> { - CustomerFootBarEntity defaultFootBarEntity = customerFootBarService.getByAppTypeAndBarKeyOfCustomer("default", barEntity.getAppType(), barEntity.getBarKey()); - CustomerFootBarDTO barDTO = new CustomerFootBarDTO(); BeanUtils.copyProperties(barEntity, barDTO); - barDTO.setDefaultBarName(defaultFootBarEntity.getBarName()); + CustomerFootBarEntity defaultFootBarEntity = customerFootBarService.getByAppTypeAndBarKeyOfCustomer("default", barEntity.getAppType(), barEntity.getBarKey()); + if(null!=defaultFootBarEntity){ + barDTO.setDefaultBarName(defaultFootBarEntity.getBarName()); + } barDTOS.add(barDTO); }); return new Result>().ok(barDTOS); diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java index eaef875365..45d36b77b1 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java @@ -200,11 +200,13 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl