update 补全所有接口 单参数接口文档

This commit is contained in:
疯狂的狮子li
2021-11-18 17:01:23 +08:00
parent 40c9559d9e
commit f8487f581b
22 changed files with 303 additions and 272 deletions

View File

@ -14,6 +14,7 @@ import com.ruoyi.demo.domain.vo.TestTreeVo;
import com.ruoyi.demo.service.ITestTreeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@ -61,7 +62,7 @@ public class TestTreeController extends BaseController {
@GetMapping("/export")
public void export(@Validated TestTreeBo bo, HttpServletResponse response) {
List<TestTreeVo> list = iTestTreeService.queryList(bo);
ExcelUtil.exportExcel(list, "测试树表", TestTreeVo.class, response);
ExcelUtil.exportExcel(list, "测试树表", TestTreeVo.class, response);
}
/**
@ -70,8 +71,9 @@ public class TestTreeController extends BaseController {
@ApiOperation("获取测试树表详细信息")
@PreAuthorize("@ss.hasPermi('demo:tree:query')")
@GetMapping("/{id}")
public AjaxResult<TestTreeVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable("id") Long id) {
public AjaxResult<TestTreeVo> getInfo(@ApiParam("测试树ID")
@NotNull(message = "主键不能为空")
@PathVariable("id") Long id) {
return AjaxResult.success(iTestTreeService.queryById(id));
}
@ -104,10 +106,11 @@ public class TestTreeController extends BaseController {
*/
@ApiOperation("删除测试树表")
@PreAuthorize("@ss.hasPermi('demo:tree:remove')")
@Log(title = "测试树表" , businessType = BusinessType.DELETE)
@Log(title = "测试树表", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) {
public AjaxResult<Void> remove(@ApiParam("测试树ID串")
@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) {
return toAjax(iTestTreeService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
}
}