release: 查询时赋予redis

release-2024-04-25
huangyw 2 months ago
parent 815b97b862
commit a5988fc59b

@ -202,6 +202,7 @@ public class TaskPointService {
TaskPoint taskPoint = (TaskPoint) redisTemplate.opsForValue().get(TASK_POINT + id);
if(taskPoint == null) {
taskPoint = taskPointDao.findById(id).get();
redisTemplate.opsForValue().set(TASK_POINT + id, taskPoint);
}
return taskPoint;
}

Loading…
Cancel
Save