Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
af9cfb40
Commit
af9cfb40
authored
May 27, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化参数&字典缓存操作
parent
6fa3bfe0
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
151 additions
and
88 deletions
+151
-88
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
.../com/ruoyi/web/controller/system/SysConfigController.java
+6
-5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
...om/ruoyi/web/controller/system/SysDictDataController.java
+2
-1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
...om/ruoyi/web/controller/system/SysDictTypeController.java
+6
-5
ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java
...ommon/src/main/java/com/ruoyi/common/utils/DictUtils.java
+10
-0
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java
...main/java/com/ruoyi/system/service/ISysConfigService.java
+13
-3
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java
...in/java/com/ruoyi/system/service/ISysDictDataService.java
+1
-1
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java
...in/java/com/ruoyi/system/service/ISysDictTypeService.java
+13
-3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
...a/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
+27
-13
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java
...com/ruoyi/system/service/impl/SysDictDataServiceImpl.java
+16
-13
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
...com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
+37
-24
ruoyi-ui/src/api/system/config.js
ruoyi-ui/src/api/system/config.js
+3
-3
ruoyi-ui/src/api/system/dict/type.js
ruoyi-ui/src/api/system/dict/type.js
+3
-3
ruoyi-ui/src/views/system/config/index.vue
ruoyi-ui/src/views/system/config/index.vue
+7
-7
ruoyi-ui/src/views/system/dict/index.vue
ruoyi-ui/src/views/system/dict/index.vue
+7
-7
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
View file @
af9cfb40
...
@@ -118,18 +118,19 @@ public class SysConfigController extends BaseController
...
@@ -118,18 +118,19 @@ public class SysConfigController extends BaseController
@DeleteMapping
(
"/{configIds}"
)
@DeleteMapping
(
"/{configIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
configIds
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
configIds
)
{
{
return
toAjax
(
configService
.
deleteConfigByIds
(
configIds
));
configService
.
deleteConfigByIds
(
configIds
);
return
success
();
}
}
/**
/**
*
清空
缓存
*
刷新参数
缓存
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:config:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('system:config:remove')"
)
@Log
(
title
=
"参数管理"
,
businessType
=
BusinessType
.
CLEAN
)
@Log
(
title
=
"参数管理"
,
businessType
=
BusinessType
.
CLEAN
)
@DeleteMapping
(
"/
clear
Cache"
)
@DeleteMapping
(
"/
refresh
Cache"
)
public
AjaxResult
clear
Cache
()
public
AjaxResult
refresh
Cache
()
{
{
configService
.
clear
Cache
();
configService
.
resetConfig
Cache
();
return
AjaxResult
.
success
();
return
AjaxResult
.
success
();
}
}
}
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
View file @
af9cfb40
...
@@ -115,6 +115,7 @@ public class SysDictDataController extends BaseController
...
@@ -115,6 +115,7 @@ public class SysDictDataController extends BaseController
@DeleteMapping
(
"/{dictCodes}"
)
@DeleteMapping
(
"/{dictCodes}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
dictCodes
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
dictCodes
)
{
{
return
toAjax
(
dictDataService
.
deleteDictDataByIds
(
dictCodes
));
dictDataService
.
deleteDictDataByIds
(
dictCodes
);
return
success
();
}
}
}
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
View file @
af9cfb40
...
@@ -104,18 +104,19 @@ public class SysDictTypeController extends BaseController
...
@@ -104,18 +104,19 @@ public class SysDictTypeController extends BaseController
@DeleteMapping
(
"/{dictIds}"
)
@DeleteMapping
(
"/{dictIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
dictIds
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
dictIds
)
{
{
return
toAjax
(
dictTypeService
.
deleteDictTypeByIds
(
dictIds
));
dictTypeService
.
deleteDictTypeByIds
(
dictIds
);
return
success
();
}
}
/**
/**
*
清空
缓存
*
刷新字典
缓存
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:dict:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('system:dict:remove')"
)
@Log
(
title
=
"字典类型"
,
businessType
=
BusinessType
.
CLEAN
)
@Log
(
title
=
"字典类型"
,
businessType
=
BusinessType
.
CLEAN
)
@DeleteMapping
(
"/
clear
Cache"
)
@DeleteMapping
(
"/
refresh
Cache"
)
public
AjaxResult
clear
Cache
()
public
AjaxResult
refresh
Cache
()
{
{
dictTypeService
.
clear
Cache
();
dictTypeService
.
resetDict
Cache
();
return
AjaxResult
.
success
();
return
AjaxResult
.
success
();
}
}
...
...
ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java
View file @
af9cfb40
...
@@ -151,6 +151,16 @@ public class DictUtils
...
@@ -151,6 +151,16 @@ public class DictUtils
return
StringUtils
.
stripEnd
(
propertyString
.
toString
(),
separator
);
return
StringUtils
.
stripEnd
(
propertyString
.
toString
(),
separator
);
}
}
/**
* 删除指定字典缓存
*
* @param key 字典键
*/
public
static
void
removeDictCache
(
String
key
)
{
SpringUtils
.
getBean
(
RedisCache
.
class
).
deleteObject
(
getCacheKey
(
key
));
}
/**
/**
* 清空字典缓存
* 清空字典缓存
*/
*/
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java
View file @
af9cfb40
...
@@ -56,12 +56,22 @@ public interface ISysConfigService
...
@@ -56,12 +56,22 @@ public interface ISysConfigService
* @param configIds 需要删除的参数ID
* @param configIds 需要删除的参数ID
* @return 结果
* @return 结果
*/
*/
public
int
deleteConfigByIds
(
Long
[]
configIds
);
public
void
deleteConfigByIds
(
Long
[]
configIds
);
/**
/**
*
清空
缓存数据
*
加载参数
缓存数据
*/
*/
public
void
clearCache
();
public
void
loadingConfigCache
();
/**
* 清空参数缓存数据
*/
public
void
clearConfigCache
();
/**
* 重置参数缓存数据
*/
public
void
resetConfigCache
();
/**
/**
* 校验参数键名是否唯一
* 校验参数键名是否唯一
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java
View file @
af9cfb40
...
@@ -41,7 +41,7 @@ public interface ISysDictDataService
...
@@ -41,7 +41,7 @@ public interface ISysDictDataService
* @param dictCodes 需要删除的字典数据ID
* @param dictCodes 需要删除的字典数据ID
* @return 结果
* @return 结果
*/
*/
public
int
deleteDictDataByIds
(
Long
[]
dictCodes
);
public
void
deleteDictDataByIds
(
Long
[]
dictCodes
);
/**
/**
* 新增保存字典数据信息
* 新增保存字典数据信息
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java
View file @
af9cfb40
...
@@ -56,12 +56,22 @@ public interface ISysDictTypeService
...
@@ -56,12 +56,22 @@ public interface ISysDictTypeService
* @param dictIds 需要删除的字典ID
* @param dictIds 需要删除的字典ID
* @return 结果
* @return 结果
*/
*/
public
int
deleteDictTypeByIds
(
Long
[]
dictIds
);
public
void
deleteDictTypeByIds
(
Long
[]
dictIds
);
/**
/**
*
清空
缓存数据
*
加载字典
缓存数据
*/
*/
public
void
clearCache
();
public
void
loadingDictCache
();
/**
* 清空字典缓存数据
*/
public
void
clearDictCache
();
/**
* 重置字典缓存数据
*/
public
void
resetDictCache
();
/**
/**
* 新增保存字典类型信息
* 新增保存字典类型信息
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
View file @
af9cfb40
...
@@ -37,11 +37,7 @@ public class SysConfigServiceImpl implements ISysConfigService
...
@@ -37,11 +37,7 @@ public class SysConfigServiceImpl implements ISysConfigService
@PostConstruct
@PostConstruct
public
void
init
()
public
void
init
()
{
{
List
<
SysConfig
>
configsList
=
configMapper
.
selectConfigList
(
new
SysConfig
());
loadingConfigCache
();
for
(
SysConfig
config
:
configsList
)
{
redisCache
.
setCacheObject
(
getCacheKey
(
config
.
getConfigKey
()),
config
.
getConfigValue
());
}
}
}
/**
/**
...
@@ -137,7 +133,7 @@ public class SysConfigServiceImpl implements ISysConfigService
...
@@ -137,7 +133,7 @@ public class SysConfigServiceImpl implements ISysConfigService
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
deleteConfigByIds
(
Long
[]
configIds
)
public
void
deleteConfigByIds
(
Long
[]
configIds
)
{
{
for
(
Long
configId
:
configIds
)
for
(
Long
configId
:
configIds
)
{
{
...
@@ -146,26 +142,44 @@ public class SysConfigServiceImpl implements ISysConfigService
...
@@ -146,26 +142,44 @@ public class SysConfigServiceImpl implements ISysConfigService
{
{
throw
new
CustomException
(
String
.
format
(
"内置参数【%1$s】不能删除 "
,
config
.
getConfigKey
()));
throw
new
CustomException
(
String
.
format
(
"内置参数【%1$s】不能删除 "
,
config
.
getConfigKey
()));
}
}
configMapper
.
deleteConfigById
(
configId
);
redisCache
.
deleteObject
(
getCacheKey
(
config
.
getConfigKey
()));
}
}
}
int
count
=
configMapper
.
deleteConfigByIds
(
configIds
);
if
(
count
>
0
)
/**
* 加载参数缓存数据
*/
@Override
public
void
loadingConfigCache
()
{
{
Collection
<
String
>
keys
=
redisCache
.
keys
(
Constants
.
SYS_CONFIG_KEY
+
"*"
);
List
<
SysConfig
>
configsList
=
configMapper
.
selectConfigList
(
new
SysConfig
());
redisCache
.
deleteObject
(
keys
);
for
(
SysConfig
config
:
configsList
)
{
redisCache
.
setCacheObject
(
getCacheKey
(
config
.
getConfigKey
()),
config
.
getConfigValue
());
}
}
return
count
;
}
}
/**
/**
* 清空缓存数据
* 清空
参数
缓存数据
*/
*/
@Override
@Override
public
void
clearCache
()
public
void
clearC
onfigC
ache
()
{
{
Collection
<
String
>
keys
=
redisCache
.
keys
(
Constants
.
SYS_CONFIG_KEY
+
"*"
);
Collection
<
String
>
keys
=
redisCache
.
keys
(
Constants
.
SYS_CONFIG_KEY
+
"*"
);
redisCache
.
deleteObject
(
keys
);
redisCache
.
deleteObject
(
keys
);
}
}
/**
* 重置参数缓存数据
*/
@Override
public
void
resetConfigCache
()
{
clearConfigCache
();
loadingConfigCache
();
}
/**
/**
* 校验参数键名是否唯一
* 校验参数键名是否唯一
*
*
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java
View file @
af9cfb40
...
@@ -63,29 +63,31 @@ public class SysDictDataServiceImpl implements ISysDictDataService
...
@@ -63,29 +63,31 @@ public class SysDictDataServiceImpl implements ISysDictDataService
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
deleteDictDataByIds
(
Long
[]
dictCodes
)
public
void
deleteDictDataByIds
(
Long
[]
dictCodes
)
{
{
int
row
=
dictDataMapper
.
deleteDictDataByIds
(
dictCodes
);
for
(
Long
dictCode
:
dictCodes
)
if
(
row
>
0
)
{
{
DictUtils
.
clearDictCache
();
SysDictData
data
=
selectDictDataById
(
dictCode
);
dictDataMapper
.
deleteDictDataById
(
dictCode
);
List
<
SysDictData
>
dictDatas
=
dictDataMapper
.
selectDictDataByType
(
data
.
getDictType
());
DictUtils
.
setDictCache
(
data
.
getDictType
(),
dictDatas
);
}
}
return
row
;
}
}
/**
/**
* 新增保存字典数据信息
* 新增保存字典数据信息
*
*
* @param d
ictD
ata 字典数据信息
* @param data 字典数据信息
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
insertDictData
(
SysDictData
d
ictD
ata
)
public
int
insertDictData
(
SysDictData
data
)
{
{
int
row
=
dictDataMapper
.
insertDictData
(
d
ictD
ata
);
int
row
=
dictDataMapper
.
insertDictData
(
data
);
if
(
row
>
0
)
if
(
row
>
0
)
{
{
DictUtils
.
clearDictCache
();
List
<
SysDictData
>
dictDatas
=
dictDataMapper
.
selectDictDataByType
(
data
.
getDictType
());
DictUtils
.
setDictCache
(
data
.
getDictType
(),
dictDatas
);
}
}
return
row
;
return
row
;
}
}
...
@@ -93,16 +95,17 @@ public class SysDictDataServiceImpl implements ISysDictDataService
...
@@ -93,16 +95,17 @@ public class SysDictDataServiceImpl implements ISysDictDataService
/**
/**
* 修改保存字典数据信息
* 修改保存字典数据信息
*
*
* @param d
ictD
ata 字典数据信息
* @param data 字典数据信息
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
updateDictData
(
SysDictData
d
ictD
ata
)
public
int
updateDictData
(
SysDictData
data
)
{
{
int
row
=
dictDataMapper
.
updateDictData
(
d
ictD
ata
);
int
row
=
dictDataMapper
.
updateDictData
(
data
);
if
(
row
>
0
)
if
(
row
>
0
)
{
{
DictUtils
.
clearDictCache
();
List
<
SysDictData
>
dictDatas
=
dictDataMapper
.
selectDictDataByType
(
data
.
getDictType
());
DictUtils
.
setDictCache
(
data
.
getDictType
(),
dictDatas
);
}
}
return
row
;
return
row
;
}
}
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
View file @
af9cfb40
...
@@ -35,12 +35,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
...
@@ -35,12 +35,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
@PostConstruct
@PostConstruct
public
void
init
()
public
void
init
()
{
{
List
<
SysDictType
>
dictTypeList
=
dictTypeMapper
.
selectDictTypeAll
();
loadingDictCache
();
for
(
SysDictType
dictType
:
dictTypeList
)
{
List
<
SysDictData
>
dictDatas
=
dictDataMapper
.
selectDictDataByType
(
dictType
.
getDictType
());
DictUtils
.
setDictCache
(
dictType
.
getDictType
(),
dictDatas
);
}
}
}
/**
/**
...
@@ -120,7 +115,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
...
@@ -120,7 +115,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
deleteDictTypeByIds
(
Long
[]
dictIds
)
public
void
deleteDictTypeByIds
(
Long
[]
dictIds
)
{
{
for
(
Long
dictId
:
dictIds
)
for
(
Long
dictId
:
dictIds
)
{
{
...
@@ -129,37 +124,54 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
...
@@ -129,37 +124,54 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
{
{
throw
new
CustomException
(
String
.
format
(
"%1$s已分配,不能删除"
,
dictType
.
getDictName
()));
throw
new
CustomException
(
String
.
format
(
"%1$s已分配,不能删除"
,
dictType
.
getDictName
()));
}
}
dictTypeMapper
.
deleteDictTypeById
(
dictId
);
DictUtils
.
removeDictCache
(
dictType
.
getDictType
());
}
}
}
int
count
=
dictTypeMapper
.
deleteDictTypeByIds
(
dictIds
);
if
(
count
>
0
)
/**
* 加载字典缓存数据
*/
public
void
loadingDictCache
()
{
{
DictUtils
.
clearDictCache
();
List
<
SysDictType
>
dictTypeList
=
dictTypeMapper
.
selectDictTypeAll
();
for
(
SysDictType
dictType
:
dictTypeList
)
{
List
<
SysDictData
>
dictDatas
=
dictDataMapper
.
selectDictDataByType
(
dictType
.
getDictType
());
DictUtils
.
setDictCache
(
dictType
.
getDictType
(),
dictDatas
);
}
}
return
count
;
}
}
/**
/**
* 清空缓存数据
* 清空
字典
缓存数据
*/
*/
@Override
public
void
clearDictCache
()
public
void
clearCache
()
{
{
DictUtils
.
clearDictCache
();
DictUtils
.
clearDictCache
();
}
}
/**
* 重置字典缓存数据
*/
public
void
resetDictCache
()
{
clearDictCache
();
loadingDictCache
();
}
/**
/**
* 新增保存字典类型信息
* 新增保存字典类型信息
*
*
* @param dict
Type
字典类型信息
* @param dict 字典类型信息
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
insertDictType
(
SysDictType
dict
Type
)
public
int
insertDictType
(
SysDictType
dict
)
{
{
int
row
=
dictTypeMapper
.
insertDictType
(
dict
Type
);
int
row
=
dictTypeMapper
.
insertDictType
(
dict
);
if
(
row
>
0
)
if
(
row
>
0
)
{
{
DictUtils
.
clearDictCache
(
);
DictUtils
.
setDictCache
(
dict
.
getDictType
(),
null
);
}
}
return
row
;
return
row
;
}
}
...
@@ -167,19 +179,20 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
...
@@ -167,19 +179,20 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
/**
/**
* 修改保存字典类型信息
* 修改保存字典类型信息
*
*
* @param dict
Type
字典类型信息
* @param dict 字典类型信息
* @return 结果
* @return 结果
*/
*/
@Override
@Override
@Transactional
@Transactional
public
int
updateDictType
(
SysDictType
dict
Type
)
public
int
updateDictType
(
SysDictType
dict
)
{
{
SysDictType
oldDict
=
dictTypeMapper
.
selectDictTypeById
(
dict
Type
.
getDictId
());
SysDictType
oldDict
=
dictTypeMapper
.
selectDictTypeById
(
dict
.
getDictId
());
dictDataMapper
.
updateDictDataType
(
oldDict
.
getDictType
(),
dict
Type
.
getDictType
());
dictDataMapper
.
updateDictDataType
(
oldDict
.
getDictType
(),
dict
.
getDictType
());
int
row
=
dictTypeMapper
.
updateDictType
(
dict
Type
);
int
row
=
dictTypeMapper
.
updateDictType
(
dict
);
if
(
row
>
0
)
if
(
row
>
0
)
{
{
DictUtils
.
clearDictCache
();
List
<
SysDictData
>
dictDatas
=
dictDataMapper
.
selectDictDataByType
(
dict
.
getDictType
());
DictUtils
.
setDictCache
(
dict
.
getDictType
(),
dictDatas
);
}
}
return
row
;
return
row
;
}
}
...
...
ruoyi-ui/src/api/system/config.js
View file @
af9cfb40
...
@@ -51,10 +51,10 @@ export function delConfig(configId) {
...
@@ -51,10 +51,10 @@ export function delConfig(configId) {
})
})
}
}
//
清理
参数缓存
//
刷新
参数缓存
export
function
clear
Cache
()
{
export
function
refresh
Cache
()
{
return
request
({
return
request
({
url
:
'
/system/config/
clear
Cache
'
,
url
:
'
/system/config/
refresh
Cache
'
,
method
:
'
delete
'
method
:
'
delete
'
})
})
}
}
...
...
ruoyi-ui/src/api/system/dict/type.js
View file @
af9cfb40
...
@@ -43,10 +43,10 @@ export function delType(dictId) {
...
@@ -43,10 +43,10 @@ export function delType(dictId) {
})
})
}
}
//
清理参数
缓存
//
刷新字典
缓存
export
function
clear
Cache
()
{
export
function
refresh
Cache
()
{
return
request
({
return
request
({
url
:
'
/system/dict/type/
clear
Cache
'
,
url
:
'
/system/dict/type/
refresh
Cache
'
,
method
:
'
delete
'
method
:
'
delete
'
})
})
}
}
...
...
ruoyi-ui/src/views/system/config/index.vue
View file @
af9cfb40
...
@@ -99,9 +99,9 @@
...
@@ -99,9 +99,9 @@
plain
plain
icon=
"el-icon-refresh"
icon=
"el-icon-refresh"
size=
"mini"
size=
"mini"
@
click=
"handle
Clear
Cache"
@
click=
"handle
Refresh
Cache"
v-hasPermi=
"['system:config:remove']"
v-hasPermi=
"['system:config:remove']"
>
清理
缓存
</el-button>
>
刷新
缓存
</el-button>
</el-col>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
...
@@ -181,7 +181,7 @@
...
@@ -181,7 +181,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
listConfig
,
getConfig
,
delConfig
,
addConfig
,
updateConfig
,
exportConfig
,
clear
Cache
}
from
"
@/api/system/config
"
;
import
{
listConfig
,
getConfig
,
delConfig
,
addConfig
,
updateConfig
,
exportConfig
,
refresh
Cache
}
from
"
@/api/system/config
"
;
export
default
{
export
default
{
name
:
"
Config
"
,
name
:
"
Config
"
,
...
@@ -355,10 +355,10 @@ export default {
...
@@ -355,10 +355,10 @@ export default {
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
})
})
},
},
/**
清理
缓存按钮操作 */
/**
刷新
缓存按钮操作 */
handle
Clear
Cache
()
{
handle
Refresh
Cache
()
{
clearCache
().
then
(
response
=>
{
refreshCache
().
then
(()
=>
{
this
.
msgSuccess
(
"
清理
成功
"
);
this
.
msgSuccess
(
"
刷新
成功
"
);
});
});
}
}
}
}
...
...
ruoyi-ui/src/views/system/dict/index.vue
View file @
af9cfb40
...
@@ -105,9 +105,9 @@
...
@@ -105,9 +105,9 @@
plain
plain
icon=
"el-icon-refresh"
icon=
"el-icon-refresh"
size=
"mini"
size=
"mini"
@
click=
"handle
Clear
Cache"
@
click=
"handle
Refresh
Cache"
v-hasPermi=
"['system:dict:remove']"
v-hasPermi=
"['system:dict:remove']"
>
清理
缓存
</el-button>
>
刷新
缓存
</el-button>
</el-col>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
...
@@ -189,7 +189,7 @@
...
@@ -189,7 +189,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
listType
,
getType
,
delType
,
addType
,
updateType
,
exportType
,
clear
Cache
}
from
"
@/api/system/dict/type
"
;
import
{
listType
,
getType
,
delType
,
addType
,
updateType
,
exportType
,
refresh
Cache
}
from
"
@/api/system/dict/type
"
;
export
default
{
export
default
{
name
:
"
Dict
"
,
name
:
"
Dict
"
,
...
@@ -359,10 +359,10 @@ export default {
...
@@ -359,10 +359,10 @@ export default {
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
})
})
},
},
/**
清理
缓存按钮操作 */
/**
刷新
缓存按钮操作 */
handle
Clear
Cache
()
{
handle
Refresh
Cache
()
{
clearCache
().
then
(
response
=>
{
refreshCache
().
then
(()
=>
{
this
.
msgSuccess
(
"
清理
成功
"
);
this
.
msgSuccess
(
"
刷新
成功
"
);
});
});
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment