Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
1876321f
Commit
1876321f
authored
Jan 28, 2026
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手机号码校验优化-fxj
parent
5136f438
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
ChecksUtil.java
...n/java/com/yifu/cloud/plus/v1/check/utils/ChecksUtil.java
+20
-2
No files found.
yifu-check/yifu-check-api/src/main/java/com/yifu/cloud/plus/v1/check/utils/ChecksUtil.java
View file @
1876321f
...
...
@@ -298,6 +298,15 @@ public class ChecksUtil {
if
(
mobileList
.
size
()
>
CommonConstants
.
ZERO_INT
){
TCheckMobile
mobile
=
null
;
for
(
String
mb
:
mobileList
){
//广电号码放行,硬编码 后续要优化
if
(
mb
.
indexOf
(
"192"
)
==
0
){
mobile
=
new
TCheckMobile
();
mobile
.
setMobile
(
mb
);
mobile
.
setStatus
(
CommonConstants
.
ONE_STRING
);
mobile
.
setMessage
(
"广电号码放行"
);
checkMobileMap
.
put
(
mb
,
mobile
);
continue
;
}
jsonObject
=
ChecksUtil
.
invokeMobileBasic
(
mb
);
// 2.处理返回结果
if
(
jsonObject
!=
null
)
{
...
...
@@ -342,10 +351,19 @@ public class ChecksUtil {
}
}
else
{
// 记录错误日志,正式项目中请换成log打印
return
R
.
failed
(
"手机号校验失败:"
+
jsonObject
.
get
(
ChecksConstants
.
MESSAGE
).
getAsString
());
//return R.failed("手机号校验失败:" + jsonObject.get(ChecksConstants.MESSAGE).getAsString());
mobile
=
new
TCheckMobile
();
mobile
.
setMobile
(
mb
);
mobile
.
setStatus
(
CommonConstants
.
TEN_STRING
);
mobile
.
setMessage
(
getJsonElementValue
(
jsonObject
.
get
(
ChecksConstants
.
MESSAGE
))+
getJsonElementValue
(
jsonObject
.
get
(
ChecksConstants
.
REMARK
)));
checkMobileMap
.
put
(
mb
,
mobile
);
}
}
else
{
return
R
.
failed
(
ChecksConstants
.
NO_DATA_RESULT
);
mobile
=
new
TCheckMobile
();
mobile
.
setMobile
(
mb
);
mobile
.
setStatus
(
CommonConstants
.
TEN_STRING
);
mobile
.
setMessage
(
"调用第三方服务失败!"
);
checkMobileMap
.
put
(
mb
,
mobile
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment