| | |
| | | throw new ServiceException("上门时间格式错误"); |
| | | } |
| | | |
| | | if(!StringUtils.hasLength(address)){ |
| | | return R.fail("详细地址不能为空"); |
| | | } |
| | | // 解析地址经纬度 |
| | | CityInfoVO cityInfoVO = GaoDeMapUtil.getAddressInfo(province + city + area + address).getDatas(); |
| | | if(Objects.isNull(cityInfoVO.getLongitude()) || Objects.isNull(cityInfoVO.getLatitude())){ |
| | | CityInfoVO cityInfoVO = GaoDeMapUtil.getAddressInfo((province==null?"":province) |
| | | + (city==null?"":city) |
| | | + (area==null?"":area) |
| | | + address).getDatas(); |
| | | if(cityInfoVO==null||Objects.isNull(cityInfoVO.getLongitude()) || Objects.isNull(cityInfoVO.getLatitude())){ |
| | | return R.fail("地址输入不正确"); |
| | | } |
| | | String areaCode = cityInfoVO.getCode(); |