订单增加车型图片

This commit is contained in:
2025-08-03 22:27:00 +08:00
parent 394e78f686
commit 11c023db25
4 changed files with 10 additions and 2 deletions

View File

@ -64,6 +64,7 @@ public interface OrderConvert {
@Mapping(source = "orderMainPO.actEndRentTime", target = "actEndRentTime"),
@Mapping(source = "companyStoreDTO.name", target = "storeName"),
@Mapping(source = "companyStoreDTO.detailedAddress", target = "detailedAddress"),
@Mapping(source = "carModelSimpleDTO.image", target = "image"),
@Mapping(source = "carDTO.modelName", target = "modelName"),
@Mapping(source = "carDTO.brandName", target = "brandName"),
@Mapping(source = "carDTO.id", target = "carId"),
@ -74,5 +75,5 @@ public interface OrderConvert {
@Mapping(source = "rentBatteyRuleDTO.durationType", target = "durationType"),
@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);
}

View File

@ -33,6 +33,9 @@ public class OrderDetailDTO {
@ApiModelProperty("品牌名称")
private String brandName;
@ApiModelProperty("车型图片")
private String image;
@ApiModelProperty("车辆id")
private String carId;

View File

@ -232,11 +232,12 @@ public class OrderServiceImpl implements OrderService {
if(orderMainPO.getRentBatteyRuleId()!=null){
rentBatteyRuleDTO = carInteg.getRentBatteyRuleByBatteyRuleId(orderMainPO.getRentBatteyRuleId());
}
CarModelSimpleDTO carModelSimpleDTO = carInteg.getCarModelByModelId(orderMainPO.getCarModelId());
CarDTO carDTO = null;
if(orderMainPO.getVehicleId() !=null){
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());
orderDetailDTO.setRentalTypeLabel(Optional.ofNullable(rentCarTypeDictDataDTO).map(SysDictDataDTO::getDictLabel).orElse(null));

View File

@ -34,4 +34,7 @@ public class CarModelSimpleDTO {
@ApiModelProperty("电池类型")
private String batteryType;
@ApiModelProperty("车型照片")
private String image;
}