From 1e2058bdfbbb0cce1a85f46b9c2b4a5238de04fb Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 30 May 2020 14:29:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E7=AE=A1=E7=90=86=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=BC=93=E5=AD=98=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/system/dict/data.js | 2 +- ruoyi-ui/src/api/system/dict/type.js | 8 ++ ruoyi-ui/src/views/system/config/index.vue | 1 - ruoyi-ui/src/views/system/dict/index.vue | 21 ++++- .../com/ruoyi/common/constant/Constants.java | 5 ++ .../com/ruoyi/common/utils/DictUtils.java | 64 +++++++++++++ .../com/ruoyi/common/utils/StringUtils.java | 6 ++ .../controller/SysDictDataController.java | 8 +- .../controller/SysDictTypeController.java | 12 +++ .../system/service/ISysDictDataService.java | 16 ---- .../system/service/ISysDictTypeService.java | 22 +++-- .../service/impl/SysDictDataServiceImpl.java | 46 ++++------ .../service/impl/SysDictTypeServiceImpl.java | 90 +++++++++++++++---- 13 files changed, 230 insertions(+), 71 deletions(-) create mode 100644 ruoyi/src/main/java/com/ruoyi/common/utils/DictUtils.java diff --git a/ruoyi-ui/src/api/system/dict/data.js b/ruoyi-ui/src/api/system/dict/data.js index 6a3f4186b..d3f8c2f20 100644 --- a/ruoyi-ui/src/api/system/dict/data.js +++ b/ruoyi-ui/src/api/system/dict/data.js @@ -20,7 +20,7 @@ export function getData(dictCode) { // 根据字典类型查询字典数据信息 export function getDicts(dictType) { return request({ - url: '/system/dict/data/dictType/' + dictType, + url: '/system/dict/data/type/' + dictType, method: 'get' }) } diff --git a/ruoyi-ui/src/api/system/dict/type.js b/ruoyi-ui/src/api/system/dict/type.js index 4b45a355e..d392f5042 100644 --- a/ruoyi-ui/src/api/system/dict/type.js +++ b/ruoyi-ui/src/api/system/dict/type.js @@ -43,6 +43,14 @@ export function delType(dictId) { }) } +// 清理参数缓存 +export function clearCache() { + return request({ + url: '/system/dict/type/clearCache', + method: 'delete' + }) +} + // 导出字典类型 export function exportType(query) { return request({ diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue index e32d2ee1e..6f87aeacb 100644 --- a/ruoyi-ui/src/views/system/config/index.vue +++ b/ruoyi-ui/src/views/system/config/index.vue @@ -352,7 +352,6 @@ export default { }, /** 清理缓存按钮操作 */ handleClearCache() { - const queryParams = this.queryParams; clearCache().then(response => { if (response.code === 200) { this.msgSuccess("清理成功"); diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue index 9c3f64732..295400816 100644 --- a/ruoyi-ui/src/views/system/dict/index.vue +++ b/ruoyi-ui/src/views/system/dict/index.vue @@ -94,6 +94,15 @@ v-hasPermi="['system:dict:export']" >导出 + + 清理缓存 + @@ -173,7 +182,7 @@