智障的我,补下 sql 脚本

This commit is contained in:
YunaiV 2021-03-14 13:13:56 +08:00
parent 2fcb54b576
commit ef6dd91f2d

View File

@ -30,9 +30,9 @@ public class RedisController {
@Resource @Resource
private StringRedisTemplate stringRedisTemplate; private StringRedisTemplate stringRedisTemplate;
@GetMapping("/get-monitor-info")
@ApiOperation("获得 Redis 监控信息") @ApiOperation("获得 Redis 监控信息")
@PreAuthorize("@ss.hasPermission('infra:redis:get-monitor-info')") @PreAuthorize("@ss.hasPermission('infra:redis:get-monitor-info')")
@GetMapping("/get-monitor-info")
public CommonResult<InfRedisMonitorRespVO> getRedisMonitorInfo() { public CommonResult<InfRedisMonitorRespVO> getRedisMonitorInfo() {
// 获得 Redis 统计信息 // 获得 Redis 统计信息
Properties info = stringRedisTemplate.execute((RedisCallback<Properties>) RedisServerCommands::info); Properties info = stringRedisTemplate.execute((RedisCallback<Properties>) RedisServerCommands::info);
@ -44,9 +44,9 @@ public class RedisController {
return success(RedisConvert.INSTANCE.build(info, dbSize, commandStats)); return success(RedisConvert.INSTANCE.build(info, dbSize, commandStats));
} }
@GetMapping("/get-key-list")
@ApiOperation("获得 Redis Key 列表") @ApiOperation("获得 Redis Key 列表")
@PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')") @PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')")
@GetMapping("/get-key-list")
public CommonResult<List<InfRedisKeyRespVO>> getKeyList() { public CommonResult<List<InfRedisKeyRespVO>> getKeyList() {
List<RedisKeyDefine> keyDefines = RedisKeyRegistry.list(); List<RedisKeyDefine> keyDefines = RedisKeyRegistry.list();
return success(RedisConvert.INSTANCE.convertList(keyDefines)); return success(RedisConvert.INSTANCE.convertList(keyDefines));