订单接口增加车辆信息
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
package com.sczx.order.dto;
|
package com.sczx.order.dto;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.sczx.order.thirdpart.dto.CarDTO;
|
||||||
import com.sczx.order.thirdpart.dto.CarModelSimpleDTO;
|
import com.sczx.order.thirdpart.dto.CarModelSimpleDTO;
|
||||||
import com.sczx.order.thirdpart.dto.CompanyStoreDTO;
|
import com.sczx.order.thirdpart.dto.CompanyStoreDTO;
|
||||||
import com.sczx.order.thirdpart.dto.RentBatteyRuleDTO;
|
import com.sczx.order.thirdpart.dto.RentBatteyRuleDTO;
|
||||||
@ -42,6 +43,9 @@ public class OrderDTO {
|
|||||||
@ApiModelProperty("车辆ID")
|
@ApiModelProperty("车辆ID")
|
||||||
private Long vehicleId;
|
private Long vehicleId;
|
||||||
|
|
||||||
|
@ApiModelProperty("车辆信息")
|
||||||
|
private CarDTO carDTO;
|
||||||
|
|
||||||
@ApiModelProperty("车型ID")
|
@ApiModelProperty("车型ID")
|
||||||
private Long carModelId;
|
private Long carModelId;
|
||||||
|
|
||||||
|
|||||||
@ -189,15 +189,22 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
OrderDTO orderDTO = OrderConvert.INSTANCE.poToDto(orderMainPO);
|
OrderDTO orderDTO = OrderConvert.INSTANCE.poToDto(orderMainPO);
|
||||||
//获取门店信息
|
//获取门店信息
|
||||||
CompanyStoreDTO companyStoreDTO = storeInteg.getStoreById(Integer.valueOf(orderMainPO.getStoreId().toString()));
|
CompanyStoreDTO companyStoreDTO = storeInteg.getStoreById(Integer.valueOf(orderMainPO.getStoreId().toString()));
|
||||||
|
orderDTO.setCompanyStoreDTO(companyStoreDTO);
|
||||||
|
|
||||||
CarModelSimpleDTO carModelSimpleDTO = carInteg.getCarModelByModelId(orderMainPO.getCarModelId());
|
CarModelSimpleDTO carModelSimpleDTO = carInteg.getCarModelByModelId(orderMainPO.getCarModelId());
|
||||||
|
orderDTO.setCarModelSimpleDTO(carModelSimpleDTO);
|
||||||
RentBatteyRuleDTO rentBatteyRuleDTO = null;
|
RentBatteyRuleDTO rentBatteyRuleDTO = null;
|
||||||
if(orderMainPO.getRentBatteyRuleId()!=null){
|
if(orderMainPO.getRentBatteyRuleId()!=null){
|
||||||
rentBatteyRuleDTO = carInteg.getRentBatteyRuleByBatteyRuleId(orderMainPO.getRentBatteyRuleId());
|
rentBatteyRuleDTO = carInteg.getRentBatteyRuleByBatteyRuleId(orderMainPO.getRentBatteyRuleId());
|
||||||
orderDTO.setRentBatteyRule(rentBatteyRuleDTO);
|
orderDTO.setRentBatteyRule(rentBatteyRuleDTO);
|
||||||
}
|
}
|
||||||
orderDTO.setCarModelSimpleDTO(carModelSimpleDTO);
|
|
||||||
orderDTO.setCompanyStoreDTO(companyStoreDTO);
|
if(orderMainPO.getVehicleId() !=null){
|
||||||
|
CarDTO carDTO = carInteg.getCarByCarCondition(CarQueryConditionReq.builder().carId(orderMainPO.getVehicleId()).build());
|
||||||
|
orderDTO.setCarDTO(carDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
LambdaQueryWrapper<OrderSubPO> orderSubLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<OrderSubPO> orderSubLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
orderSubLambdaQueryWrapper.eq(OrderSubPO::getOrderId,orderMainPO.getOrderId());
|
orderSubLambdaQueryWrapper.eq(OrderSubPO::getOrderId,orderMainPO.getOrderId());
|
||||||
List<OrderSubPO> orderSubPOList = orderSubRepo.list(orderSubLambdaQueryWrapper);
|
List<OrderSubPO> orderSubPOList = orderSubRepo.list(orderSubLambdaQueryWrapper);
|
||||||
|
|||||||
Reference in New Issue
Block a user