订单增加车型图片
This commit is contained in:
@ -64,6 +64,7 @@ public interface OrderConvert {
|
|||||||
@Mapping(source = "orderMainPO.actEndRentTime", target = "actEndRentTime"),
|
@Mapping(source = "orderMainPO.actEndRentTime", target = "actEndRentTime"),
|
||||||
@Mapping(source = "companyStoreDTO.name", target = "storeName"),
|
@Mapping(source = "companyStoreDTO.name", target = "storeName"),
|
||||||
@Mapping(source = "companyStoreDTO.detailedAddress", target = "detailedAddress"),
|
@Mapping(source = "companyStoreDTO.detailedAddress", target = "detailedAddress"),
|
||||||
|
@Mapping(source = "carModelSimpleDTO.image", target = "image"),
|
||||||
@Mapping(source = "carDTO.modelName", target = "modelName"),
|
@Mapping(source = "carDTO.modelName", target = "modelName"),
|
||||||
@Mapping(source = "carDTO.brandName", target = "brandName"),
|
@Mapping(source = "carDTO.brandName", target = "brandName"),
|
||||||
@Mapping(source = "carDTO.id", target = "carId"),
|
@Mapping(source = "carDTO.id", target = "carId"),
|
||||||
@ -74,5 +75,5 @@ public interface OrderConvert {
|
|||||||
@Mapping(source = "rentBatteyRuleDTO.durationType", target = "durationType"),
|
@Mapping(source = "rentBatteyRuleDTO.durationType", target = "durationType"),
|
||||||
@Mapping(source = "rentBatteyOrder.vinBatteryNo", target = "batteyNo"),
|
@Mapping(source = "rentBatteyOrder.vinBatteryNo", target = "batteyNo"),
|
||||||
})
|
})
|
||||||
OrderDetailDTO mainOrderToDetailDTO(OrderMainPO orderMainPO, CompanyStoreDTO companyStoreDTO, RentBatteyRuleDTO rentBatteyRuleDTO, CarDTO carDTO, OrderSubPO rentBatteyOrder);
|
OrderDetailDTO mainOrderToDetailDTO(OrderMainPO orderMainPO, CompanyStoreDTO companyStoreDTO, RentBatteyRuleDTO rentBatteyRuleDTO, CarDTO carDTO, CarModelSimpleDTO carModelSimpleDTO,OrderSubPO rentBatteyOrder);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,9 @@ public class OrderDetailDTO {
|
|||||||
@ApiModelProperty("品牌名称")
|
@ApiModelProperty("品牌名称")
|
||||||
private String brandName;
|
private String brandName;
|
||||||
|
|
||||||
|
@ApiModelProperty("车型图片")
|
||||||
|
private String image;
|
||||||
|
|
||||||
@ApiModelProperty("车辆id")
|
@ApiModelProperty("车辆id")
|
||||||
private String carId;
|
private String carId;
|
||||||
|
|
||||||
|
|||||||
@ -232,11 +232,12 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
if(orderMainPO.getRentBatteyRuleId()!=null){
|
if(orderMainPO.getRentBatteyRuleId()!=null){
|
||||||
rentBatteyRuleDTO = carInteg.getRentBatteyRuleByBatteyRuleId(orderMainPO.getRentBatteyRuleId());
|
rentBatteyRuleDTO = carInteg.getRentBatteyRuleByBatteyRuleId(orderMainPO.getRentBatteyRuleId());
|
||||||
}
|
}
|
||||||
|
CarModelSimpleDTO carModelSimpleDTO = carInteg.getCarModelByModelId(orderMainPO.getCarModelId());
|
||||||
CarDTO carDTO = null;
|
CarDTO carDTO = null;
|
||||||
if(orderMainPO.getVehicleId() !=null){
|
if(orderMainPO.getVehicleId() !=null){
|
||||||
carDTO = carInteg.getCarByCarCondition(CarQueryConditionReq.builder().carId(orderMainPO.getVehicleId()).build());
|
carDTO = carInteg.getCarByCarCondition(CarQueryConditionReq.builder().carId(orderMainPO.getVehicleId()).build());
|
||||||
}
|
}
|
||||||
OrderDetailDTO orderDetailDTO = OrderConvert.INSTANCE.mainOrderToDetailDTO(orderMainPO, companyStoreDTO, rentBatteyRuleDTO, carDTO, rentBatteyOrder);
|
OrderDetailDTO orderDetailDTO = OrderConvert.INSTANCE.mainOrderToDetailDTO(orderMainPO, companyStoreDTO, rentBatteyRuleDTO, carDTO, carModelSimpleDTO,rentBatteyOrder);
|
||||||
|
|
||||||
SysDictDataDTO rentCarTypeDictDataDTO = storeInteg.getDictDataByDicTypeAndValue("key_order_rental_type", orderDetailDTO.getRentalType());
|
SysDictDataDTO rentCarTypeDictDataDTO = storeInteg.getDictDataByDicTypeAndValue("key_order_rental_type", orderDetailDTO.getRentalType());
|
||||||
orderDetailDTO.setRentalTypeLabel(Optional.ofNullable(rentCarTypeDictDataDTO).map(SysDictDataDTO::getDictLabel).orElse(null));
|
orderDetailDTO.setRentalTypeLabel(Optional.ofNullable(rentCarTypeDictDataDTO).map(SysDictDataDTO::getDictLabel).orElse(null));
|
||||||
|
|||||||
@ -34,4 +34,7 @@ public class CarModelSimpleDTO {
|
|||||||
|
|
||||||
@ApiModelProperty("电池类型")
|
@ApiModelProperty("电池类型")
|
||||||
private String batteryType;
|
private String batteryType;
|
||||||
|
|
||||||
|
@ApiModelProperty("车型照片")
|
||||||
|
private String image;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user