You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
791 B
44 lines
791 B
package com.hai.common.security;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
public class VerifyCode {
|
|
|
|
/**
|
|
* 验证码唯一标识 手机号
|
|
*/
|
|
private String uniqueCode;
|
|
|
|
/**
|
|
* 存储验证码
|
|
*/
|
|
private String verifyCode;
|
|
|
|
public VerifyCode(){
|
|
|
|
}
|
|
public VerifyCode(String uniqueCode, String verifyCode){
|
|
this.uniqueCode = uniqueCode;
|
|
this.verifyCode = verifyCode;
|
|
}
|
|
|
|
public String getUniqueCode() throws Exception {
|
|
if(StringUtils.isEmpty(uniqueCode)){
|
|
throw new Exception("VerifyCode uniqueCode is null");
|
|
}
|
|
return uniqueCode;
|
|
}
|
|
|
|
public void setUniqueCode(String uniqueCode) {
|
|
this.uniqueCode = uniqueCode;
|
|
}
|
|
|
|
public String getObject() {
|
|
return verifyCode;
|
|
}
|
|
|
|
public void setObject(String verifyCode) {
|
|
this.verifyCode = verifyCode;
|
|
}
|
|
|
|
}
|
|
|