处理订单快递单号错误时重新发货

This commit is contained in:
朱耘稷
2020-12-08 17:10:19 +08:00
parent bf49bb1976
commit 3266999397
3 changed files with 63 additions and 1 deletions

View File

@ -211,6 +211,24 @@ public class StoreOrderController {
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
@ApiOperation(value = "修改快递单号")
@PutMapping(value = "/yxStoreOrder/updateDelivery")
@PreAuthorize("hasAnyAuthority('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')")
public ResponseEntity updateDelivery(@Validated @RequestBody YxStoreOrder resources) {
if (StrUtil.isBlank(resources.getDeliveryName())) {
throw new BadRequestException("请选择快递公司");
}
if (StrUtil.isBlank(resources.getDeliveryId())) {
throw new BadRequestException("快递单号不能为空");
}
yxStoreOrderService.updateDelivery(resources.getOrderId(),resources.getDeliveryId(),
resources.getDeliveryName(),resources.getDeliveryType());
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
@ApiOperation(value = "订单核销")
@PutMapping(value = "/yxStoreOrder/check")
@PreAuthorize("hasAnyRole('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')")