Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
H
Hgs
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
徐州
Hgs
Commits
a6b3d47e
Commit
a6b3d47e
authored
May 23, 2022
by
徐州
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手機號碼隱藏需求
parent
d7501b6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
MobileUtil.java
...s-web/src/main/java/com/house365/web/util/MobileUtil.java
+22
-0
MobileUtil.java
...hgs-ws/src/main/java/com/house365/ws/util/MobileUtil.java
+22
-0
No files found.
house365-hgs-web/src/main/java/com/house365/web/util/MobileUtil.java
0 → 100644
View file @
a6b3d47e
package
com
.
house365
.
web
.
util
;
import
org.apache.http.util.TextUtils
;
public
class
MobileUtil
{
/**
* 隐藏手机号4-7位
* 不足7位不处理
* @param phone
* @return
*/
public
static
String
hidePhone
(
String
phone
)
{
if
(
TextUtils
.
isEmpty
(
phone
)
||
phone
.
length
()
<
7
)
return
phone
;
return
phone
.
substring
(
0
,
3
)
+
"****"
+
phone
.
substring
(
7
);
}
public
static
void
main
(
String
[]
args
)
{
String
p
=
"1234567"
;
System
.
out
.
println
(
hidePhone
(
p
));
}
}
house365-hgs-ws/src/main/java/com/house365/ws/util/MobileUtil.java
0 → 100644
View file @
a6b3d47e
package
com
.
house365
.
ws
.
util
;
import
org.apache.http.util.TextUtils
;
public
class
MobileUtil
{
/**
* 隐藏手机号4-7位
* 不足7位不处理
* @param phone
* @return
*/
public
static
String
hidePhone
(
String
phone
)
{
if
(
TextUtils
.
isEmpty
(
phone
)
||
phone
.
length
()
<
7
)
return
phone
;
return
phone
.
substring
(
0
,
3
)
+
"****"
+
phone
.
substring
(
7
);
}
public
static
void
main
(
String
[]
args
)
{
String
p
=
"1234567"
;
System
.
out
.
println
(
hidePhone
(
p
));
}
}
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