コード例 #1
0
  @Override
  public void checkProfile() throws RuntimeException {
    int accountId = accountService.selectAccountId(); // 접속 중인 ID
    Profile profile = new Profile();
    profile.setAccountId(accountId);

    int profileCnt = this.selectProfileCnt(profile);

    if (profileCnt < 1) { // 생성된 프로필이 없으면 생성
      this.insertProfile(profile);
    }
  }
コード例 #2
0
  @Override
  public int getProfileId() throws RuntimeException {

    Account account = AuthenticationUtils.getUser();
    int accountId = account.getId(); // 접속 중인 ID

    Profile profile = new Profile();
    profile.setAccountId(accountId);

    int profileCnt = this.selectProfileCnt(profile);

    if (profileCnt < 1) { // 생성된 프로필이 없으면 생성
      this.insertProfile(profile);
    }

    int profileId = this.selectProfileId(profile);

    return profileId;
  }