|
@ -166,11 +166,12 @@ public class CustomerFootBarController { |
|
|
List<CustomerFootBarEntity> footbars = customerFootBarService.listAllCustomerFootBars(customerId, appType); |
|
|
List<CustomerFootBarEntity> footbars = customerFootBarService.listAllCustomerFootBars(customerId, appType); |
|
|
List<CustomerFootBarDTO> barDTOS = new LinkedList<>(); |
|
|
List<CustomerFootBarDTO> barDTOS = new LinkedList<>(); |
|
|
footbars.forEach(barEntity -> { |
|
|
footbars.forEach(barEntity -> { |
|
|
CustomerFootBarEntity defaultFootBarEntity = customerFootBarService.getByAppTypeAndBarKeyOfCustomer("default", barEntity.getAppType(), barEntity.getBarKey()); |
|
|
|
|
|
|
|
|
|
|
|
CustomerFootBarDTO barDTO = new CustomerFootBarDTO(); |
|
|
CustomerFootBarDTO barDTO = new CustomerFootBarDTO(); |
|
|
BeanUtils.copyProperties(barEntity, barDTO); |
|
|
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); |
|
|
barDTOS.add(barDTO); |
|
|
}); |
|
|
}); |
|
|
return new Result<List<CustomerFootBarDTO>>().ok(barDTOS); |
|
|
return new Result<List<CustomerFootBarDTO>>().ok(barDTOS); |
|
|