@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); } }
@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; }