Commit 802bfb1c authored by jiaorz's avatar jiaorz

修改租車訂單地址,修改车辆预定时添加订单号

parent 64176698
......@@ -18,8 +18,11 @@ public class ResultCode {
// 车辆预定失败,请重试
public static int BOOKED_FAILED_CODE = Integer.valueOf(SystemProperty.getResultConfig("BOOKED_FAILED_CODE"));
// 车辆预定失败,请重试
public static int ONLY_BOOK_FROM_TODAY = Integer.valueOf(SystemProperty.getResultConfig("BOOKED_FAILED_CODE"));
//预定时间不能为空 DATE_TIME_IS_NULL
public static int DATE_TIME_IS_NULL = Integer.valueOf(SystemProperty.getResultConfig("DATE_TIME_IS_NULL"));
// 预定时间不能小于当前时间
public static int ONLY_BOOK_FROM_TODAY = Integer.valueOf(SystemProperty.getResultConfig("ONLY_BOOK_FROM_TODAY"));
// 添加车辆失败,请重试
public static int ADD_VEHICLE_FAIL = Integer.valueOf(SystemProperty.getResultConfig("ADD_VEHICLE_FAIL"));
......
......@@ -222,4 +222,6 @@ ADD_VEHICLE_FAIL = 4009
UPDATE_VEHICLE_FAIL = 4010
4010 = 修改车辆失败,请重试
DATE_TIME_IS_NULL = 4011
4011 = 预定时间不能为空
......@@ -327,6 +327,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
checkIfVehicleExists(bookVehicleVo.getVehicleId());
//提取日期和相应的预定目标日期
Map<String,List<String>> yearMonthAndDate = Maps.newHashMap();
//预定时间不能为空
if(StringUtils.isBlank(bookVehicleVo.getBookStartDate()) || StringUtils.isBlank(bookVehicleVo.getBookEndDate())){
throw new BaseException(ResultCode.DATE_TIME_IS_NULL);
}
String[] bookStartDateArray = bookVehicleVo.getBookStartDate().split(" ");
String[] bookEndDateArray = bookVehicleVo.getBookEndDate().split(" ");
......@@ -412,6 +416,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
checkIfVehicleExists(bookVehicleVo.getVehicleId());
//提取日期和相应的预定目标日期
Map<String,List<String>> yearMonthAndDate = Maps.newHashMap();
//预定时间不能为空
if(StringUtils.isBlank(bookVehicleVo.getBookStartDate()) || StringUtils.isBlank(bookVehicleVo.getBookEndDate())){
throw new BaseException(ResultCode.DATE_TIME_IS_NULL);
}
DateTime startDay =DateTime.parse(bookVehicleVo.getBookStartDate(),DATE_TIME_FORMATTER);
DateTime endDay =DateTime.parse(bookVehicleVo.getBookEndDate(), DATE_TIME_FORMATTER);
......
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