|
|
@@ -243,29 +243,6 @@ public class WxMagnetController extends BaseController
|
|
|
}
|
|
|
|
|
|
|
|
|
- @Log(title = "redis缓存清除", businessType = BusinessType.UPDATE)
|
|
|
- @PostMapping("/cleanRedisByDb")
|
|
|
- @ResponseBody
|
|
|
- public AjaxResult cleanRedisByDb(@RequestBody RedisDbParam redisDbParam)
|
|
|
- {
|
|
|
- if(redisDbParam.getRedisDb().length==0){
|
|
|
- return AjaxResult.error(201,"redis库未指定!");
|
|
|
- }
|
|
|
- for (int db : redisDbParam.getRedisDb()) {
|
|
|
- try (Jedis jedis = JedisPoolUtil.getResource()) {
|
|
|
- jedis.select(db);
|
|
|
- if(StringUtils.isNotBlank(redisDbParam.getKeyName())){
|
|
|
- jedis.del(redisDbParam.getKeyName());
|
|
|
- log.info("清空库" + db+"下的"+redisDbParam.getKeyName());
|
|
|
- }
|
|
|
- else{
|
|
|
- jedis.flushDB();
|
|
|
- log.info("清空库" + db);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return AjaxResult.success("操作成功!");
|
|
|
- }
|
|
|
|
|
|
|
|
|
|