赞
踩
使用Swawgger2.7的UI页面进行接口测试时,传递参数,后端的方法无法获取请求的参数。
请求参数页面
后台接受参数的方法
后端完整代码
- @Description("废料包材回收入库记录")
- @RequestMapping(value="/wastePackageRecoveryInWareHouseRecord",method =RequestMethod.POST)
- @ResponseBody
- @ApiOperation(value="废料包材回收入库记录", notes="上位机扫码,点击回收按钮进行废料包材回收入库")
- @ApiImplicitParam(name = "trayCode", value = "托盘编码", required = true, dataType = "String")
- public Json IWmsWastePackageRecoveryInWareHouseRecord(String trayCode) {
- return this.wmsMasterCleanFinishService.IWmsWastePackageRecoveryInWareHouseRecord(trayCode);
- }
在注解 @ApiImplicitParam中添加paramType="query"参数类型。
参数类型修改后的UI页面
后台完整示例代码
- @Description("废料包材回收入库记录")
- @RequestMapping(value="/wastePackageRecoveryInWareHouseRecord",method =RequestMethod.POST)
- @ResponseBody
- @ApiOperation(value="废料包材回收入库记录", notes="上位机扫码,点击回收按钮进行废料包材回收入库")
- @ApiImplicitParam(name = "trayCode", value = "托盘编码", required = true, dataType = "String",paramType="query")
- public Json IWmsWastePackageRecoveryInWareHouseRecord(String trayCode) {
- return this.wmsMasterCleanFinishService.IWmsWastePackageRecoveryInWareHouseRecord(trayCode);
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。