From 9748e10339f81073e4fefe8516c1a03312a25d05 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期三, 07 十二月 2022 11:41:44 +0800 Subject: [PATCH] 升级druid到最新版本1.2.15 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 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 acad00e..bfd467e 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 @@ -1,6 +1,7 @@ package com.ruoyi.web.controller.system; import java.util.List; +import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; @@ -45,12 +46,12 @@ @Log(title = "字典类型", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:dict:export')") - @GetMapping("/export") - public AjaxResult export(SysDictType dictType) + @PostMapping("/export") + public void export(HttpServletResponse response, SysDictType dictType) { List<SysDictType> list = dictTypeService.selectDictTypeList(dictType); ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class); - return util.exportExcel(list, "字典类型"); + util.exportExcel(response, list, "字典类型"); } /** @@ -60,7 +61,7 @@ @GetMapping(value = "/{dictId}") public AjaxResult getInfo(@PathVariable Long dictId) { - return AjaxResult.success(dictTypeService.selectDictTypeById(dictId)); + return success(dictTypeService.selectDictTypeById(dictId)); } /** @@ -73,7 +74,7 @@ { if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) { - return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在"); + return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在"); } dict.setCreateBy(getUsername()); return toAjax(dictTypeService.insertDictType(dict)); @@ -89,7 +90,7 @@ { if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) { - return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在"); + return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在"); } dict.setUpdateBy(getUsername()); return toAjax(dictTypeService.updateDictType(dict)); @@ -116,7 +117,7 @@ public AjaxResult refreshCache() { dictTypeService.resetDictCache(); - return AjaxResult.success(); + return success(); } /** @@ -126,6 +127,6 @@ public AjaxResult optionselect() { List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll(); - return AjaxResult.success(dictTypes); + return success(dictTypes); } } -- Gitblit v1.9.2