update 加缓存

This commit is contained in:
2023-06-21 10:40:25 +08:00
parent 2105e83522
commit eac73ee7ba

View File

@@ -16,6 +16,7 @@ import com.jsowell.pile.vo.web.PileModelInfoVO;
import com.jsowell.thirdparty.amap.domain.*;
import com.jsowell.thirdparty.amap.service.AMapService;
import com.jsowell.thirdparty.amap.util.AMapUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@@ -32,6 +33,7 @@ import java.util.Map;
* @author Lemon
* @Date 2023/6/14 13:54
*/
@Slf4j
@Service
public class AMapServiceImpl implements AMapService {
@@ -60,7 +62,7 @@ public class AMapServiceImpl implements AMapService {
*/
@Override
public List<AMapStationInfo> getStationInfos(GetStationInfoDTO dto) {
StopWatch sw = new StopWatch("高德拉取充电站静态数据");
StopWatch sw = new StopWatch();
List<AMapStationInfo> resultList = new ArrayList<>();
if (StringUtils.equals("page", dto.getType())) {
@@ -119,6 +121,7 @@ public class AMapServiceImpl implements AMapService {
resultList.add(aMapInfo);
}
sw.stop();
log.info("接口耗时:{}", sw.prettyPrint());
return resultList;
}