手机号授权:格式化手机号校验修复

This commit is contained in:
lzm
2022-12-01 17:06:13 +08:00
committed by yeungchihang
parent 591a932517
commit 65c65caad8
2 changed files with 2 additions and 2 deletions

View File

@@ -238,7 +238,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
* @return
*/
public static String maskPhone(String phoneAreaCode,String phone) {
if(CommonUtil.checkPhoneFormat(phoneAreaCode,phone)){
if(!CommonUtil.checkPhoneFormat(phoneAreaCode,phone)){
return null;
}

View File

@@ -119,7 +119,7 @@ public class VoiceBottleActivityService extends ActivityBaseService {
String redisKey = RedisKey.activity_rank_voice_bottle_like.getKey();
this.verifyActivity(uid, new Date(messTime)); //条件检验
Users users = usersService.getUsersByUid(uid);
if (users == null || StringUtils.isEmpty(users.getPhone()) || CommonUtil.checkPhoneFormat(users.getPhoneAreaCode(),users.getPhone())){
if (users == null || StringUtils.isEmpty(users.getPhone()) || !CommonUtil.checkPhoneFormat(users.getPhoneAreaCode(),users.getPhone())){
logger.info("update like user num failed, users is not exist or no bind mobile phone uid = {}", uid);
return;
}