Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
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
YZG
yzg-util
Commits
0252e680
Commit
0252e680
authored
Sep 02, 2020
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改MQ请求尸体,防止出错
parent
c5d7609a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
AreaHelper.java
...src/main/java/com/yanzuoguang/util/helper/AreaHelper.java
+7
-2
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/helper/AreaHelper.java
View file @
0252e680
...
@@ -51,10 +51,15 @@ public class AreaHelper {
...
@@ -51,10 +51,15 @@ public class AreaHelper {
}
else
if
(
fromAreaId
.
length
()
!=
AREA_LENGTH
)
{
}
else
if
(
fromAreaId
.
length
()
!=
AREA_LENGTH
)
{
throw
new
CodeException
(
"地区编码不合法,长度不为9"
);
throw
new
CodeException
(
"地区编码不合法,长度不为9"
);
}
}
String
ret
=
fromAreaId
.
substring
(
0
,
length
);
// 获取国家
String
country
=
fromAreaId
.
substring
(
0
,
3
);
// 获取城市
String
city
=
fromAreaId
.
substring
(
3
);
String
ret
=
city
.
substring
(
0
,
length
-
3
);
String
retSimple
=
getSimple
(
ret
);
String
retSimple
=
getSimple
(
ret
);
if
(
StringHelper
.
compare
(
ret
,
retSimple
))
{
if
(
StringHelper
.
compare
(
ret
,
retSimple
))
{
return
getFull
(
retSimple
);
return
getFull
(
country
+
retSimple
);
}
}
return
StringHelper
.
EMPTY
;
return
StringHelper
.
EMPTY
;
}
}
...
...
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