mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-15 07:18:31 +08:00
update 加缓存
This commit is contained in:
@@ -16,6 +16,7 @@ import com.jsowell.pile.vo.web.PileModelInfoVO;
|
|||||||
import com.jsowell.thirdparty.amap.domain.*;
|
import com.jsowell.thirdparty.amap.domain.*;
|
||||||
import com.jsowell.thirdparty.amap.service.AMapService;
|
import com.jsowell.thirdparty.amap.service.AMapService;
|
||||||
import com.jsowell.thirdparty.amap.util.AMapUtils;
|
import com.jsowell.thirdparty.amap.util.AMapUtils;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
@@ -32,6 +33,7 @@ import java.util.Map;
|
|||||||
* @author Lemon
|
* @author Lemon
|
||||||
* @Date 2023/6/14 13:54
|
* @Date 2023/6/14 13:54
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
public class AMapServiceImpl implements AMapService {
|
public class AMapServiceImpl implements AMapService {
|
||||||
|
|
||||||
@@ -60,7 +62,7 @@ public class AMapServiceImpl implements AMapService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<AMapStationInfo> getStationInfos(GetStationInfoDTO dto) {
|
public List<AMapStationInfo> getStationInfos(GetStationInfoDTO dto) {
|
||||||
StopWatch sw = new StopWatch("高德拉取充电站静态数据");
|
StopWatch sw = new StopWatch();
|
||||||
List<AMapStationInfo> resultList = new ArrayList<>();
|
List<AMapStationInfo> resultList = new ArrayList<>();
|
||||||
|
|
||||||
if (StringUtils.equals("page", dto.getType())) {
|
if (StringUtils.equals("page", dto.getType())) {
|
||||||
@@ -119,6 +121,7 @@ public class AMapServiceImpl implements AMapService {
|
|||||||
resultList.add(aMapInfo);
|
resultList.add(aMapInfo);
|
||||||
}
|
}
|
||||||
sw.stop();
|
sw.stop();
|
||||||
|
log.info("接口耗时:{}", sw.prettyPrint());
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user