我只希望优化 if (CollUtil.isNotEmpty(ruleAllDataNew)) {…
- User
我只希望优化 if (CollUtil.isNotEmpty(ruleAllDataNew)) { redisTemplate.execute((RedisCallback) connection -> { connection.openPipeline();
for (RuleInfoWithFormula ruleInfoWithFormula : ruleAllDataNew) { String key = RedisKeyConstants.RULE_BASE .replace("#{drugUuid}", ruleInfoWithFormula.getDrugUuid()) + ruleInfoWithFormula.getRuleId(); byte[] keyBytes = key.getBytes(); byte[] value = redisTemplate.getValueSerializer().serialize(ruleInfoWithFormula); connection.set(keyBytes, value); } connection.closePipeline(); return null; }); }这部分代码 Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.