diff --git a/luoo_user/src/main/java/com/luoo/user/service/TaskPointService.java b/luoo_user/src/main/java/com/luoo/user/service/TaskPointService.java index 177e310..98dfe37 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/TaskPointService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/TaskPointService.java @@ -61,7 +61,6 @@ public class TaskPointService { taskPoint.setCreateUser(userLoginDto.getUserId()); taskPointDao.save(taskPoint); - redisTemplate.opsForValue().set(TASK_POINT + taskPoint.getId(), taskPoint); } @@ -75,8 +74,13 @@ public class TaskPointService { @Transactional(rollbackFor = Exception.class) public void update(TaskPoint taskPoint, String token) { UserLoginDto userLoginDto = jwtUtil.getUserLoginDto(token); - taskPoint.setUpdateUser(userLoginDto.getUserId()); + TaskPoint old = taskPointDao.getOne(taskPoint.getId()); + old.setValid(taskPoint.getValid()); + old.setDescription(taskPoint.getDescription()); + old.setScore(taskPoint.getScore()); + old.setType(taskPoint.getType()); + old.setUpdateUser(userLoginDto.getUserId()); taskPointDao.save(taskPoint); redisTemplate.delete(TASK_POINT + taskPoint.getId());