添加 商家推送充电设备动态数据接口

This commit is contained in:
Lemon
2023-06-19 08:55:33 +08:00
parent 087fd3f242
commit 17ac50a5a6

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson2.JSON;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.pile.dto.QueryPileDTO;
import com.jsowell.pile.dto.amap.GetStationInfoDTO;
import com.jsowell.thirdparty.amap.common.AMapCommonParams;
import com.jsowell.thirdparty.amap.common.AMapCommonResult;
@@ -57,4 +58,18 @@ public class AMapController extends BaseController {
return result.checkSignFailed();
// logger.info("高德拉取充电站静态数据 result:{}", );
}
@PostMapping("/pushStationStatus")
public AMapCommonResult pushStationStatus(@RequestBody QueryPileDTO dto) {
AMapCommonResult result = new AMapCommonResult();
logger.info("商家推送充电设备动态数据");
try {
String pushResult = aMapService.pushChargingDeviceDynamics(dto.getPileConnectorCode());
return result.successResponse(pushResult);
} catch (Exception e) {
logger.error("商家推送充电设备动态数据 error", e);
}
return result.failedResponse();
}
}