Compare commits
2 Commits
85ac51c506
...
785014f068
| Author | SHA1 | Date |
|---|---|---|
|
|
785014f068 | |
|
|
734fb4c269 |
|
|
@ -13,7 +13,7 @@ public class PhoneNumberValidation {
|
|||
try {
|
||||
Phonenumber.PhoneNumber phoneNumber = phoneNumberUtil.parse(number, "CN");
|
||||
boolean isCorrect = phoneNumberUtil.isValidNumber(phoneNumber);
|
||||
logger.info("号码:{}是一个正确的号码",number);
|
||||
logger.info("号码:{},是否合法: {}",number,isCorrect);
|
||||
return isCorrect;
|
||||
} catch (NumberParseException e) {
|
||||
logger.error("NumberParseException was thrown: ",e);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.kimgo.wepush;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.kimgo.wepush.common.PhoneNumberValidation;
|
||||
import com.kimgo.wepush.mapper.QyWeChatAppInfoMapper;
|
||||
import com.kimgo.wepush.model.QyWeChatAppInfo;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
@ -40,4 +41,12 @@ public class QyWeChatAppInfoMapperTest {
|
|||
|
||||
System.out.println("Test complete");
|
||||
}
|
||||
@Test
|
||||
public void testAllColum(){
|
||||
for (int i = 1; i < 12; i++) {
|
||||
QyWeChatAppInfo qyWeChatAppInfo = qyWeChatAppInfoMapper.selectById(i);
|
||||
PhoneNumberValidation phoneNumberValidation = new PhoneNumberValidation();
|
||||
phoneNumberValidation.isValidPhoneNumber(qyWeChatAppInfo.getPhoneNumber());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue