From 0d8cc04b812cfa0f15bf8ba12b5fdcbe411f90cd Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期四, 10 二月 2022 16:07:02 +0800 Subject: [PATCH] Merge branch 'Phase3' of https://dev.pollex.com.tw:8443/r/pcalife/PAM into Phase3 --- pamapi/src/main/java/com/pollex/pam/web/rest/vm/OtpAccount.java | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/pamapi/src/main/java/com/pollex/pam/web/rest/vm/OtpAccount.java b/pamapi/src/main/java/com/pollex/pam/web/rest/vm/OtpAccount.java index 4ee1a74..e64bdca 100644 --- a/pamapi/src/main/java/com/pollex/pam/web/rest/vm/OtpAccount.java +++ b/pamapi/src/main/java/com/pollex/pam/web/rest/vm/OtpAccount.java @@ -1,5 +1,13 @@ package com.pollex.pam.web.rest.vm; +import java.util.Optional; + +import org.apache.http.util.Asserts; +import org.springframework.util.Assert; +import org.springframework.util.StringUtils; + +import com.pollex.pam.domain.Customer; + public class OtpAccount { private String account; private String indexKey; @@ -24,4 +32,12 @@ public void setIndexKey(String indexKey) { this.indexKey = indexKey; } + + public static OtpAccount createOtpAccount(Customer customerAcct, String indexKey) { + String acct = customerAcct.toAccountString(); + + Assert.hasText(acct, "Customer phone or email must not null"); + + return new OtpAccount(acct, indexKey); + } } -- Gitblit v1.8.0