bug--代码规范优化

This commit is contained in:
taochengbo
2020-10-11 18:44:17 +08:00
parent 61a09632d8
commit cb5f228ac6
7 changed files with 22 additions and 7 deletions

View File

@ -58,7 +58,9 @@ public class LocationUtils {
public static GetTencentLocationVO getLocation(String addr) {
String key = RedisUtil.get(ShopKeyUtils.getTengXunMapKey());
if (StrUtil.isBlank(key)) throw new BadRequestException("请先配置腾讯地图key");
if (StrUtil.isBlank(key)) {
throw new BadRequestException("请先配置腾讯地图key");
}
String url = StrUtil.format("?address={}&key={}", addr, key);
String json = HttpUtil.get(QQ_MAP_URL + url);
return JSONObject.parseObject(json, GetTencentLocationVO.class);