[EDIT] userIdでUserEntity情報を取得するメソッドを追加しました。

This commit is contained in:
s-choi
2026-09-18 15:06:16 +09:00
parent 34e9a17273
commit db65afe184

View File

@@ -2,6 +2,7 @@ package com.example.demo.app.domain.service.impl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.example.demo.app.domain.model.UserModel;
import com.example.demo.app.domain.service.UserService; import com.example.demo.app.domain.service.UserService;
import com.example.demo.app.infra.entity.CourseEntity; import com.example.demo.app.infra.entity.CourseEntity;
import com.example.demo.app.infra.entity.GoalEntity; import com.example.demo.app.infra.entity.GoalEntity;
@@ -69,6 +70,11 @@ public class UserServiceImpl implements UserService {
userRepository.save(userEntity); userRepository.save(userEntity);
} }
public UserModel findByUserId(Long userId) {
return UserModel.convertFrom(userRepository.findById(userId).get());
}
} }