[FIX] userに目標が紐づけられない問題を修正しました。

This commit is contained in:
s-choi
2026-09-24 10:41:38 +09:00
parent 65d80e6306
commit 5ca3226dfa

View File

@@ -45,13 +45,11 @@ public class UserServiceImpl implements UserService {
GoalEntity goalEntity = new GoalEntity(); GoalEntity goalEntity = new GoalEntity();
goalEntity.setTargetAmount(Integer.parseInt(String.valueOf(userForm.getGoalId()))); goalEntity.setTargetAmount(Integer.parseInt(String.valueOf(userForm.getGoalId())));
goalRepository.save(
goalEntity);
CourseEntity courseEntity = courseRepository.findById(courseId).orElse(null); CourseEntity courseEntity = courseRepository.findById(courseId).orElse(null);
userEntity.setQuestionEntity(questionEntity); userEntity.setQuestionEntity(questionEntity);
userEntity.setGoalEntity(goalEntity); userEntity.setGoalEntity(goalRepository.save(
goalEntity));
userEntity.setCourseEntity(courseEntity); userEntity.setCourseEntity(courseEntity);
userEntity.setDeleteFlag(0); userEntity.setDeleteFlag(0);