diff --git a/src/main/java/com/sczx/order/service/impl/OrderServiceImpl.java b/src/main/java/com/sczx/order/service/impl/OrderServiceImpl.java index 290dc09..98cdab1 100644 --- a/src/main/java/com/sczx/order/service/impl/OrderServiceImpl.java +++ b/src/main/java/com/sczx/order/service/impl/OrderServiceImpl.java @@ -240,9 +240,11 @@ public class OrderServiceImpl implements OrderService { SysDictDataDTO rentCarTypeDictDataDTO = storeInteg.getDictDataByDicTypeAndValue("key_order_rental_type", orderDetailDTO.getRentalType()); orderDetailDTO.setRentalTypeLabel(Optional.ofNullable(rentCarTypeDictDataDTO).map(SysDictDataDTO::getDictLabel).orElse(null)); + if(orderDetailDTO.getDurationType()!=null){ + SysDictDataDTO rentCarBatteyDictDataDTO = storeInteg.getDictDataByDicTypeAndValue("key_rental_type", orderDetailDTO.getDurationType().toString()); + orderDetailDTO.setDurationTypeLabel(Optional.ofNullable(rentCarBatteyDictDataDTO).map(SysDictDataDTO::getDictLabel).orElse(null)); + } - SysDictDataDTO rentCarBatteyDictDataDTO = storeInteg.getDictDataByDicTypeAndValue("key_rental_type", orderDetailDTO.getDurationType().toString()); - orderDetailDTO.setDurationTypeLabel(Optional.ofNullable(rentCarBatteyDictDataDTO).map(SysDictDataDTO::getDictLabel).orElse(null)); return orderDetailDTO; }