手机号授权:获取申请记录增加区号过滤
This commit is contained in:
@@ -95,6 +95,13 @@ public class PhoneAuthApplyRecordServiceImpl extends ServiceImpl<PhoneAuthApplyR
|
||||
}
|
||||
|
||||
public PhoneAuthApplyRecord getAuthApplyRecord(String phone, String phoneAreaCode) {
|
||||
if (StringUtils.isEmpty(phone) || StringUtils.isEmpty(phoneAreaCode)) {
|
||||
return null;
|
||||
}
|
||||
if (phone.startsWith(phoneAreaCode)) {
|
||||
phone = phone.replaceFirst(phoneAreaCode,"");
|
||||
}
|
||||
|
||||
QueryWrapper<PhoneAuthApplyRecord> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(PhoneAuthApplyRecord::getPhone,phone).eq(PhoneAuthApplyRecord::getAuthCode,phoneAreaCode);
|
||||
return this.getOne(queryWrapper,false);
|
||||
|
Reference in New Issue
Block a user