Commit 0252e680 authored by yanzg's avatar yanzg

修改MQ请求尸体,防止出错

parent c5d7609a
......@@ -51,10 +51,15 @@ public class AreaHelper {
} else if (fromAreaId.length() != AREA_LENGTH) {
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);
if (StringHelper.compare(ret, retSimple)) {
return getFull(retSimple);
return getFull(country + retSimple);
}
return StringHelper.EMPTY;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment