Commit 91571354 authored by zhengyi's avatar zhengyi

修改强制到仓和撤销到仓请求参数传值方式

parent 58d76943
......@@ -9,13 +9,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.Collections;
......@@ -39,18 +33,18 @@ public class OrderWarehouseCheckController {
return success(service.listByOrderItemId(orderItemId));
}
@PostMapping("/force")
@PostMapping("/force/{orderId}")
@ApiOperation("强制到仓")
@ApiImplicitParam(name = "orderId", value = "订单id", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<Boolean> force(@RequestParam("orderId") Long orderId) {
public CommonResult<Boolean> force(@PathVariable("orderId") Long orderId) {
service.force(orderId);
return success(true);
}
@PostMapping("/revoke")
@PostMapping("/revoke/{orderId}")
@ApiOperation("撤销到仓")
@ApiImplicitParam(name = "orderId", value = "订单id", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<Boolean> revoke(@RequestParam("orderId") Long orderId) {
public CommonResult<Boolean> revoke(@PathVariable("orderId") Long orderId) {
service.revoke(orderId);
return success(true);
}
......
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