|
@@ -152,7 +152,7 @@ public class CargoConsignAction {
|
|
userAuthoricationService.queryUserAuthority(ValidationUtil.checkAndAssignInt(userId), Role.CARRIER);
|
|
userAuthoricationService.queryUserAuthority(ValidationUtil.checkAndAssignInt(userId), Role.CARRIER);
|
|
params.setUserId(Integer.parseInt(userId));
|
|
params.setUserId(Integer.parseInt(userId));
|
|
Orders order = orderService.queryFullOrderByOrderId(ValidationUtil.checkAndAssignInt(params.getOrderId()));
|
|
Orders order = orderService.queryFullOrderByOrderId(ValidationUtil.checkAndAssignInt(params.getOrderId()));
|
|
- ValidationUtil.checkBlankAndAssignString(params.getCarNo());//车牌号校验
|
|
|
|
|
|
+ ValidationUtil.checkBlankAndAssignString(params.getCarNo(),CARNO_PATTERN);//车牌号校验
|
|
if(order==null) throw new RuntimeException("订单不存在");
|
|
if(order==null) throw new RuntimeException("订单不存在");
|
|
if(!Statuses.UNDELIVER.equals(order.getStatusId())) throw new RuntimeException("非法操作");
|
|
if(!Statuses.UNDELIVER.equals(order.getStatusId())) throw new RuntimeException("非法操作");
|
|
if(!params.getUserId().equals(order.getCarrierId())) throw new RuntimeException("无权操作");
|
|
if(!params.getUserId().equals(order.getCarrierId())) throw new RuntimeException("无权操作");
|