Commit 39b9c460 authored by 周健威's avatar 周健威

添加特惠租车定时

parent 0c3cc636
...@@ -90,12 +90,14 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> { ...@@ -90,12 +90,14 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> {
*/ */
public void addRent(@RequestBody SpecialRent specialRent, UserDTO userDTO) { public void addRent(@RequestBody SpecialRent specialRent, UserDTO userDTO) {
AssertUtils.isBlank(userDTO); AssertUtils.isBlank(userDTO);
AssertUtils.isBlank(specialRent.getUnitPrice());
if(StrUtil.isBlank(specialRent.getVehicleId())) { if(StrUtil.isBlank(specialRent.getVehicleId())) {
throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE); throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE);
} }
//Vehicle vehicle = vehicleFeign.get(specialRent.getVehicleId()).getData(); //Vehicle vehicle = vehicleFeign.get(specialRent.getVehicleId()).getData();
VehicleVO vehicle = vehicleFeign.getVehicleDetail(specialRent.getVehicleId()).getData(); VehicleVO vehicle = vehicleFeign.getVehicleDetail(specialRent.getVehicleId()).getData();
vehicle.setVehicleExtensions(vehicleFeign.vehicleEextensionTree(specialRent.getVehicleId()).getData());
if(null == vehicle) { if(null == vehicle) {
throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE); throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE);
...@@ -184,8 +186,8 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> { ...@@ -184,8 +186,8 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> {
} }
Date endDateTime = DateUtil.date(specialRent.getEndTime()); Date endDateTime = DateUtil.date(specialRent.getEndTime());
Long delayTime = DateUtil.date().getTime() - DateUtil.offsetHour(endDateTime, -1).getTime(); Long delayTime = DateUtil.offsetHour(endDateTime, -1).getTime() - DateUtil.date().getTime();
specialRent.setOverTime(delayTime); specialRent.setOverTime(DateUtil.offsetHour(endDateTime, -1).getTime());
insertSelective(specialRent); insertSelective(specialRent);
// rabbitProduct.sendApplyRequireDelayMessage(baseBiz.selectById(shuntApply.getId()), delayTime); // rabbitProduct.sendApplyRequireDelayMessage(baseBiz.selectById(shuntApply.getId()), delayTime);
rabbitProduct.sendSpecialDelayMessage(selectById(specialRent.getId()), delayTime); rabbitProduct.sendSpecialDelayMessage(selectById(specialRent.getId()), delayTime);
......
...@@ -73,6 +73,10 @@ public interface VehicleFeign { ...@@ -73,6 +73,10 @@ public interface VehicleFeign {
@RequestMapping(value = "/app/vehicle/app/unauth/detail/{id}", method = RequestMethod.GET) @RequestMapping(value = "/app/vehicle/app/unauth/detail/{id}", method = RequestMethod.GET)
public ObjectRestResponse<VehicleVO> getVehicleDetail(@PathVariable("id") String id); public ObjectRestResponse<VehicleVO> getVehicleDetail(@PathVariable("id") String id);
//查询扩展信息
@RequestMapping(value = "/app/vehicleEextension/app/unauth/tree", method = RequestMethod.GET)
public ObjectRestResponse<List<VehicleExtensionVO>> vehicleEextensionTree(@RequestParam(value = "vehicleId")String vehicleId);
//租车拒绝预约 //租车拒绝预约
@RequestMapping(value = "/vehicleInfo/rent/book/reject/{bookRecordId}", method = RequestMethod.PUT) @RequestMapping(value = "/vehicleInfo/rent/book/reject/{bookRecordId}", method = RequestMethod.PUT)
public RestResponse<Integer> rentRejectVehicleBooking(@PathVariable(value = "bookRecordId") Long bookRecordId); public RestResponse<Integer> rentRejectVehicleBooking(@PathVariable(value = "bookRecordId") Long bookRecordId);
......
...@@ -69,7 +69,6 @@ public class VehicleVO extends Vehicle { ...@@ -69,7 +69,6 @@ public class VehicleVO extends Vehicle {
private Map<String,Object> handleOption; // 可操作的选项 private Map<String,Object> handleOption; // 可操作的选项
private List<VehicleExtensionVO> vehicleExtensions;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment