コード例 #1
0
ファイル: StateValues.java プロジェクト: ulei0343/huazhen
 public static int getCustomerId() {
   String strCustomerId =
       instance.cookieManager.getCookieValues(
           ServletActionContext.getRequest(), StateName.P2P_CUSTOMER_ID);
   if (StringHelper.canConvertToNumber(strCustomerId))
     return Integer.parseInt(EncodeHelper.extractRandomCustomerId(strCustomerId));
   else return 0;
 }
コード例 #2
0
ファイル: StateValues.java プロジェクト: ulei0343/huazhen
 public static void setCustomerId(int customerId) {
   instance.cookieManager.setCookie(
       ServletActionContext.getResponse(),
       StateName.P2P_CUSTOMER_ID,
       String.valueOf(EncodeHelper.generateRandomCustomerId(customerId)));
 }