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