コード例 #1
0
 @Override
 public User findUserById(Long userId) {
   User user = userDAO.findByPK(userId);
   if (user == null) {
     throw new ValidationException(
         CustomError.ErrorCode.USER_NOT_FOUND.getErrorCode(),
         messageSourceAccessor.getMessage("error.user.not.found"));
   }
   return user;
 }
コード例 #2
0
 @Override
 public void updatePassword(Long userId, String newPassword) {
   User user = userDAO.findByPK(userId);
   user.setPassword(newPassword);
   userDAO.saveOrUpdate(user);
 }