2021.10.6

こんにちは!!
今回は、imtra-martのAPIを使用したアカウント情報の登録処理のサンプルをご紹介します。
まず、今回ご紹介するAPI によって登録されるマスタは以下になります。
■テーブル名
・B_M_ACCOUNT_B (アカウント)
・B_M_ACCOUNT_THEME (アカウントテーマ)
・IM_ACCOUNT_LICENSE (アカウントライセンス)
■APIを使用したサンプルソース
String userCd = "test001";
Date baseDate = appCmn.getSystemStartDate(); // システム開始日(1900/01/01)
Date endDate = appCmn.getSystemEndDate(); // システム終了日(2999/12/31)
// アカウント情報
AccountInfoManager acInfMng = new AccountInfoManager();
// アカウントをセット
AccountInfo acInfo = new AccountInfo();
acInfo.setUserCd(userCd); // ユーザコード
acInfo.setValidStartDate(baseDate); // 有効期間開始日
acInfo.setValidEndDate(endDate); // 有効期間終了日
acInfo.setPassword("01234"); // パスワード
acInfo.setLoginFailureCount(0); // ログイン失敗回数
Map<String, String> themeIdMap = new HashMap<String, String>();
themeIdMap.put("pc", "im_theme_60_blue");
acInfo.setThemeIds(themeIdMap); // テーマ設定
// アカウント情報の登録
acInfMng.addAccountInfo(acInfo);
// ユーザライセンス登録
UserLicense userlicense = new UserLicense();
userlicense.registerAccountLicense(1);
今回のご紹介はここまで。。
それではまた (^-^)/~~~