标签:request offices delete ams 接口 rgb nbsp src image
@RequestBody
一般用于接口 接收参数为“对象”
接口示例
@SysLog("新增办公室") @ApiOperation(value = "新增办公室") @ApiImplicitParams(value = { @ApiImplicitParam(paramType = "body", name = "iotOfficeDTO", dataType = "IotOfficeDTO", required = true, value = "办公室对象")}) @PostMapping public R<Boolean> saveIotOffice(@RequestBody IotOfficeDTO iotOfficeDTO) { return R.ok(iiotOfficeService.saveIotOffice(iotOfficeDTO)); }
@RequestParam("id")
括号内指定接收参数的key 名称
一般用于接口 接收单个基础数据类型参数 如 int String 等
接口示例
@SysLog("根据id(逻辑)删除办公室") @ApiOperation(value = "根据id(逻辑)删除办公室") @DeleteMapping @ApiImplicitParams(@ApiImplicitParam(paramType = "query", name = "id", dataType = "Integer", required = true, value = "办公室id")) public R<Boolean> deleteIotOffice(@RequestParam("id") Integer id) { if (null != id) { return R.ok(iiotOfficeService.deleteIotOffice(id)); } return R.failed(BusinessEnum.PARAMETER_NULL); }
标签:request offices delete ams 接口 rgb nbsp src image
原文地址:https://www.cnblogs.com/wong-/p/14760216.html