💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 组件源码 /** * <b>方法描述:</b> 删除(批量) <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2020-06-09 15:10:25 <br/> * * @param keys * 入参|keys|{@link java.util.List} * @param number * 出参|删除的key数量|{@link long} * @return -1 异常<br/> * 1 成功<br/> */ @Component(label = "删除(批量)", style = "判断型", type = "同步组件", comment = "批量删除Keys,如果删除的key不存在,则直接忽略,反回被删除的keys的数量", version = "1.0.0", deprecated = false, author = "admin", date = "2020-06-09 03:10:25") @InParams(param = { @Param(name = "keys", comment = "keys", type = java.util.List.class) }) @OutParams(param = { @Param(name = "number", comment = "删除的key数量", type = long.class) }) @Returns(returns = { @Return(id = "-1", desp = "异常"), @Return(id = "1", desp = "成功") }) public static ResultBase P_delKeys(List keys) { try { return ResultBase.newSuccessResult(redisTemplate.delete(keys)); } catch (Exception e) { AppLog.error(e); return ResultBase.newExceptionResult("TPTR3015", "删除(批量) 异常:" + AppLog.errorMsg(e)); } } 交易中组件使用方式: ![](https://img.kancloud.cn/12/a1/12a187a6bec866e0c58220f5bb2ed012_1358x750.jpg) ## 参数说明及示例 keys:redis中的key集合,示例: `["qwer","asdf","zxcv","qazwsx"]` 删除的key数量:返回值为数字,记录被删除的keys的数量,示例: `__INNER__["num"]` > 批量删除Keys,如果删除的key不存在,则直接忽略,反回被删除的keys的数量