常用註釋:
- @Api用在控制層類上,說明該類的作用。可以標記一個 Controller 類作爲 Swagger 文檔資源。
@Api(value = "數據分析研判", tags = "數據分析研判接口")
- @ApiModel用在實體類上,用於實體類中的參數接收說明。
@ApiModel(value = "Agent", description = "代理人信息表")
- @ApiModelProperty,在@ApiModel的基礎上,對錶的字段進行說明。
@ApiModelProperty(value = "案件主鍵")
private Long caseId;
- @ApiParam,用於在Controller層接收參數說明。
public R remove(@ApiParam(value = "主鍵集合", required = true) @RequestParam String ids) {
return R.status(flowInfoService.deleteLogic(Func.toLongList(ids)));
}
5.@ ApiOperation用在控制層的方法上,對方法進行說明。
@ApiOperation(value = "邏輯刪除", notes = "傳入ids")
public R remove(@ApiParam(value = "主鍵集合", required = true) @RequestParam String ids) {
return R.status(flowInfoService.deleteLogic(Func.toLongList(ids)));
}
- @ApiOperationSupport用在controller層上,爲控制類排序。
@ApiOperationSupport(order = 10)