| | |
| | | if(importing!=null && importing){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,上次任务正在执行中,请稍后再试!"); |
| | | } |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.CHECKING_JKCUSTOMER_LOCATION,true); |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.CHECKING_JKCUSTOMER_LOCATION,true,60,TimeUnit.MINUTES); |
| | | try { |
| | | LambdaQueryWrapper<JkCustomer> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.isNotNull(JkCustomer::getLocation); |
| | |
| | | String url = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.GAODE_LOCATION_GEOAPI_URL).getCode(); |
| | | for(JkCustomer c : list){ |
| | | try { |
| | | String addr =c.getLocation().replaceAll("[^a-zA-Z0-9\\u4e00-\\u9fa5]", ""); |
| | | String urlStr =url.replace("${param}" |
| | | ,c.getLocation().replaceAll("[^a-zA-Z0-9\\u4e00-\\u9fa5]", "")); |
| | | ,addr); |
| | | String result = HttpsUtil.get(urlStr,true); |
| | | JSONObject json = JSONObject.parseObject(result); |
| | | if(json!=null |