From 8f674eec70fb31441fc0cf6fb4aad11a36b03e59 Mon Sep 17 00:00:00 2001 From: huangyw <1207046171@qq.com> Date: Thu, 1 Aug 2024 14:16:11 +0800 Subject: [PATCH] =?UTF-8?q?release:=20TaskPoint=20=E5=B0=81=E8=A3=85DTO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/luoo/user/service/TaskPointService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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());