Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
8fb8cec5
Commit
8fb8cec5
authored
Dec 03, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取手机号自定义规则不成功避免空指针错误,直接忽略走下一步正常逻辑
parent
a97eb666
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
PhoneUtil.java
...der/yudao/framework/common/util/validation/PhoneUtil.java
+4
-3
No files found.
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/validation/PhoneUtil.java
View file @
8fb8cec5
...
...
@@ -162,7 +162,7 @@ public class PhoneUtil {
try
{
List
<
DictDataRespDTO
>
dtos
=
DictFrameworkUtils
.
listDictDatasFromCache
(
"phone_number_rule"
);
if
(
CollUtil
.
isNotEmpty
(
dtos
))
{
DictDataRespDTO
dto
=
dtos
.
stream
().
filter
(
d
->
d
.
getValue
().
trim
().
equals
(
code
.
trim
())).
findFirst
().
orElse
Get
(
null
);
DictDataRespDTO
dto
=
dtos
.
stream
().
filter
(
d
->
d
.
getValue
().
trim
().
equals
(
code
.
trim
())).
findFirst
().
orElse
(
null
);
if
(
Objects
.
nonNull
(
dto
))
{
// 优先获取中文
rule
=
dto
.
getLabel
();
...
...
@@ -171,9 +171,10 @@ public class PhoneUtil {
rule
=
dto
.
getLabelEn
();
}
}
}
else
{
log
.
error
(
"未获取到手机号自定义规则, code: %s, mobile: %s->"
,
code
,
mobile
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
String
.
format
(
"获取手机号规则失败, code: %s, mobile: %s->"
,
code
,
mobile
),
e
);
}
...
...
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