Commit f489541d authored by jiaorz's avatar jiaorz

修改后台取消订单

parent 539be028
...@@ -12,7 +12,6 @@ import com.github.wxiaoqi.security.common.exception.BaseException; ...@@ -12,7 +12,6 @@ import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.activity.user.UserInfoBiz; import com.xxfc.platform.activity.user.UserInfoBiz;
import com.xxfc.platform.order.biz.inner.OrderCalculateBiz;
import com.xxfc.platform.order.biz.inner.OrderMsgBiz; import com.xxfc.platform.order.biz.inner.OrderMsgBiz;
import com.xxfc.platform.order.contant.enumerate.CrosstownTypeEnum; import com.xxfc.platform.order.contant.enumerate.CrosstownTypeEnum;
import com.xxfc.platform.order.contant.enumerate.DepositRefundStatus; import com.xxfc.platform.order.contant.enumerate.DepositRefundStatus;
...@@ -171,7 +170,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp ...@@ -171,7 +170,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
OrderRentVehicleDetail orderRentVehicleDetail = orderRentVehicleBiz.selectById(baseOrder.getDetailId()); OrderRentVehicleDetail orderRentVehicleDetail = orderRentVehicleBiz.selectById(baseOrder.getDetailId());
if (orderVehicleCrosstownDto.getType() == CrosstownTypeEnum.DEPARTURE.getCode()) { if (orderVehicleCrosstownDto.getType() == CrosstownTypeEnum.DEPARTURE.getCode()) {
boolean flag = getTodayTime(orderRentVehicleDetail.getStartTime()); boolean flag = getTodayTime(orderRentVehicleDetail.getStartTime(), orderRentVehicleDetail.getEndTime());
if (!flag) { if (!flag) {
return ObjectRestResponse.createFailedResult(3502, "今日不是交车日期"); return ObjectRestResponse.createFailedResult(3502, "今日不是交车日期");
} }
...@@ -432,9 +431,15 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp ...@@ -432,9 +431,15 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
return illegalReserve; return illegalReserve;
} }
public boolean getTodayTime(Long time) { /**
* 当前时间大于预定开始时间当天0点,小于结束时间当天时间24点 2019.11.04
* @param startTime
* @param endTime
* @return
*/
public boolean getTodayTime(Long startTime, Long endTime) {
long current = System.currentTimeMillis(); long current = System.currentTimeMillis();
if (current <= (getDayStart(time) + 24 * 60 * 60 * 1000 - 1) && current >= getDayStart(time)) { if (getDayStart(startTime) <= (current) && current <= getDayStart(endTime) + 1000 * 3600 * 24 - 1) {
return true; return true;
} }
return false; return false;
......
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