diff --git a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/AMapController.java b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/AMapController.java index 95bea49cd..4c4d6fa6f 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/AMapController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/AMapController.java @@ -60,6 +60,35 @@ public class AMapController extends BaseController { } + /** + * 高德拉取商家静态详细信息 + * @param requestMap + * @return + */ + @PostMapping("/getStationInfo") + public AMapCommonResult getStationInfo(@RequestParam Map requestMap) { + AMapCommonResult result = new AMapCommonResult(); + String paramString = JSON.toJSONString(requestMap); + logger.info("高德拉取商家静态详细信息 params:{}", paramString); + try { + // Map map = JSON.parseObject(paramString, Map.class); + // Map paramMap = (Map)JSON.parse(paramString); + if (AMapUtils.checkSign(requestMap)) { + // true 验签成功 + String bizContent = requestMap.get("biz_content"); + GetStationInfoDTO dto = JSON.parseObject(bizContent, GetStationInfoDTO.class); + List stationInfos = aMapService.getStationInfosV2(dto); + result = result.successResponse(stationInfos); + logger.info("高德拉取商家静态详细信息 success result:{}", JSON.toJSONString(result)); + return result; + } + } catch (Exception e) { + + } + return null; + } + + @PostMapping("/pushStationStatus") public AMapCommonResult pushStationStatus(@RequestBody QueryPileDTO dto) { AMapCommonResult result = new AMapCommonResult(); diff --git a/jsowell-admin/src/test/java/SpringBootTestController.java b/jsowell-admin/src/test/java/SpringBootTestController.java index 4fa9933aa..3af7b2933 100644 --- a/jsowell-admin/src/test/java/SpringBootTestController.java +++ b/jsowell-admin/src/test/java/SpringBootTestController.java @@ -2587,7 +2587,7 @@ public class SpringBootTestController { // String s = aMapService.pushChargingDeviceDynamics(pileConnectorCode); GetStationInfoDTO dto = new GetStationInfoDTO(); dto.setType("page"); - aMapService.getStationInfos(dto); + // aMapService.getStationInfos(dto); } @Test diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/dto/amap/GetStationInfoDTO.java b/jsowell-pile/src/main/java/com/jsowell/pile/dto/amap/GetStationInfoDTO.java index 79abe4dff..f82bb299d 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/dto/amap/GetStationInfoDTO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/dto/amap/GetStationInfoDTO.java @@ -2,6 +2,8 @@ package com.jsowell.pile.dto.amap; import lombok.Data; +import java.util.List; + /** * 高德地图查询充电站信息DTO * @@ -18,4 +20,9 @@ public class GetStationInfoDTO { // 每页记录数,最大20 private Integer pageSize; + + /** + * 站点id列表 + */ + private List idList; } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/PileStationInfoMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/PileStationInfoMapper.java index 68ada5aab..6c92e1efa 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/PileStationInfoMapper.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/PileStationInfoMapper.java @@ -3,6 +3,7 @@ package com.jsowell.pile.mapper; import com.jsowell.pile.domain.PileStationInfo; import com.jsowell.pile.dto.QueryStationDTO; import com.jsowell.pile.dto.QueryStationInfoDTO; +import com.jsowell.pile.dto.amap.GetStationInfoDTO; import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryStationInfoDTO; import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO; import com.jsowell.pile.vo.ningxiajiaotou.NXJTStationInfoVO; @@ -83,7 +84,7 @@ public interface PileStationInfoMapper { List getStationInfoForLianLian(@Param("dto") QueryStationInfoDTO dto); - List getStationInfoForAmap(); + List getStationInfoForAmap(@Param("dto") GetStationInfoDTO dto); List queryByStationDeptIds(@Param("stationDeptIds") List stationDeptIds); diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/PileStationInfoService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/PileStationInfoService.java index a09c51b48..c30dca4f5 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/PileStationInfoService.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/PileStationInfoService.java @@ -5,6 +5,7 @@ import com.jsowell.pile.domain.PileStationInfo; import com.jsowell.pile.dto.FastCreateStationDTO; import com.jsowell.pile.dto.QueryStationDTO; import com.jsowell.pile.dto.QueryStationInfoDTO; +import com.jsowell.pile.dto.amap.GetStationInfoDTO; import com.jsowell.pile.dto.lutongyunting.BindParkingPlatformDTO; import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryStationInfoDTO; import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO; @@ -110,7 +111,7 @@ public interface PileStationInfoService { List getStationInfosByThirdParty(QueryStationInfoDTO dto); - List getStationInfosByAmap(); + List getStationInfosByAmap(GetStationInfoDTO dto); List queryByStationDeptIds(List stationIds); diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java index 5685a66a4..ebd87b4cd 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java @@ -24,6 +24,7 @@ import com.jsowell.pile.domain.ThirdpartyParkingConfig; import com.jsowell.pile.dto.FastCreateStationDTO; import com.jsowell.pile.dto.QueryStationDTO; import com.jsowell.pile.dto.QueryStationInfoDTO; +import com.jsowell.pile.dto.amap.GetStationInfoDTO; import com.jsowell.pile.dto.lutongyunting.BindParkingPlatformDTO; import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryStationInfoDTO; import com.jsowell.pile.mapper.PileStationInfoMapper; @@ -235,8 +236,8 @@ public class PileStationInfoServiceImpl implements PileStationInfoService { } @Override - public List getStationInfosByAmap() { - return pileStationInfoMapper.getStationInfoForAmap(); + public List getStationInfosByAmap(GetStationInfoDTO dto) { + return pileStationInfoMapper.getStationInfoForAmap(dto); } @Override diff --git a/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml index 2bc6381ae..4296bf5a9 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml @@ -560,9 +560,16 @@