保誠-保戶業務員媒合平台
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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;
 
    public OtpAccount(String account, String indexKey) {
        this.account = account;
        this.indexKey = indexKey;
    }
 
    public String getAccount() {
        return account;
    }
 
    public void setAccount(String account) {
        this.account = account;
    }
 
    public String getIndexKey() {
        return indexKey;
    }
 
    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);
    }
}