From 321bb010cbf6be68ee938f3819d6d18cf7bb1e4d Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期四, 18 十一月 2021 19:28:39 +0800 Subject: [PATCH] update 更新注解参数类型 去除多余警告 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java index 1e21a41..37e9d8c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java @@ -11,6 +11,7 @@ import com.ruoyi.system.service.ISysDictTypeService; 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; @@ -44,7 +45,7 @@ @ApiOperation("瀵煎嚭瀛楀吀绫诲瀷鍒楄〃") @Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:dict:export')") - @GetMapping("/export") + @PostMapping("/export") public void export(SysDictType dictType, HttpServletResponse response) { List<SysDictType> list = dictTypeService.selectDictTypeList(dictType); ExcelUtil.exportExcel(list, "瀛楀吀绫诲瀷", SysDictType.class, response); @@ -56,7 +57,7 @@ @ApiOperation("鏌ヨ瀛楀吀绫诲瀷璇︾粏") @PreAuthorize("@ss.hasPermi('system:dict:query')") @GetMapping(value = "/{dictId}") - public AjaxResult<SysDictType> getInfo(@PathVariable Long dictId) { + public AjaxResult<SysDictType> getInfo(@ApiParam("瀛楀吀ID") @PathVariable Long dictId) { return AjaxResult.success(dictTypeService.selectDictTypeById(dictId)); } @@ -71,7 +72,6 @@ if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) { return AjaxResult.error("鏂板瀛楀吀'" + dict.getDictName() + "'澶辫触锛屽瓧鍏哥被鍨嬪凡瀛樺湪"); } - dict.setCreateBy(getUsername()); return toAjax(dictTypeService.insertDictType(dict)); } @@ -86,7 +86,6 @@ if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) { return AjaxResult.error("淇敼瀛楀吀'" + dict.getDictName() + "'澶辫触锛屽瓧鍏哥被鍨嬪凡瀛樺湪"); } - dict.setUpdateBy(getUsername()); return toAjax(dictTypeService.updateDictType(dict)); } @@ -97,7 +96,7 @@ @PreAuthorize("@ss.hasPermi('system:dict:remove')") @Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.DELETE) @DeleteMapping("/{dictIds}") - public AjaxResult<Void> remove(@PathVariable Long[] dictIds) { + public AjaxResult<Void> remove(@ApiParam("瀛楀吀ID涓�") @PathVariable Long[] dictIds) { dictTypeService.deleteDictTypeByIds(dictIds); return success(); } -- Gitblit v1.9.3