oauth-手机号注册-dev环境放开校验手机号格式
This commit is contained in:
@@ -33,6 +33,7 @@ import com.google.gson.Gson;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.jms.core.JmsTemplate;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
@@ -51,6 +52,8 @@ import java.util.Optional;
|
||||
@Slf4j
|
||||
public class MyUserDetailsServiceImpl implements MyUserDetailsService {
|
||||
|
||||
@Value("spring.profiles.active:dev")
|
||||
private String activeProfile;
|
||||
@Autowired
|
||||
private JedisService jedisService;
|
||||
@Autowired
|
||||
@@ -109,7 +112,7 @@ public class MyUserDetailsServiceImpl implements MyUserDetailsService {
|
||||
throws Exception {
|
||||
Account account = null;
|
||||
log.info("phone:{}, phoneAreaCode:{}, smsCode:{}, deviceInfo:{}, ipAddress:{}",phone,phoneAreaCode,smsCode,deviceInfo,ipAddress);
|
||||
if (CommonUtil.checkPhoneFormat(phoneAreaCode,phone)) {
|
||||
if (CommonUtil.checkPhoneFormat(phoneAreaCode,phone) || "dev".equals(activeProfile)) {
|
||||
account = accountManageService.getOrGenAccountByPhone(phone,phoneAreaCode,smsCode,deviceInfo,ipAddress);
|
||||
} else if (CommonUtil.checkNumberOnly(phone)) {
|
||||
account = accountService.getAccountByErBanNo(Long.valueOf(phone));
|
||||
|
Reference in New Issue
Block a user