提交 89036f0c 编写于 作者: wangxinxu's avatar wangxinxu

创建账号时,检验手机号格式

上级 43ae535f
流水线 #53424 已失败 于阶段
......@@ -16,6 +16,7 @@ import com.pica.cloud.foundation.encryption.util.EncryptUtils;
import com.pica.cloud.foundation.redis.ICacheClient;
import com.pica.cloud.foundation.utils.entity.PicaUser;
import com.pica.cloud.foundation.utils.utils.ValidateUtils;
import lombok.var;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
......@@ -27,6 +28,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.regex.Pattern;
/**
* @author andong
......@@ -90,6 +92,9 @@ public class AccountServiceImpl implements AccountService {
@Override
@Transactional
public void createAccount(Account account, Integer bizType) {
if (!ValidateUtils.isMobile(EncryptUtils.decryptContent(account.getMobilePhone(), EncryptConstants.ENCRYPT_TYPE_MOBILE, EncryptConstants.ENCRYPT_DECRYPT_KEY))) {
throw new AccountException(AccountExceptionEnum.PICA_MOBILE_ERROR);
}
//账户表
AccountInfoEntity accountInfo = new AccountInfoEntity();
Date currentTime = new Date();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册