mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update联联平台
This commit is contained in:
@@ -328,6 +328,7 @@ public class LianLianController extends ThirdPartyBaseController {
|
||||
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryEquipAuth(queryEquipmentDTO);
|
||||
logger.info("{}-请求设备认证 result:{}", platformName, JSON.toJSONString(map));
|
||||
return CommonResult.success(0, "请求设备认证成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-请求设备认证 error:", platformName, e);
|
||||
@@ -363,7 +364,7 @@ public class LianLianController extends ThirdPartyBaseController {
|
||||
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryStartCharge(queryStartChargeDTO);
|
||||
|
||||
logger.info("{}-请求启动充电 result:{}", platformName, JSON.toJSONString(map));
|
||||
return CommonResult.success(0, "请求启动充电成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-请求启动充电 error", platformName, e);
|
||||
@@ -371,6 +372,31 @@ public class LianLianController extends ThirdPartyBaseController {
|
||||
return CommonResult.failed("请求启动充电发生异常");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 推送启动充电结果
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/notification_start_charge_result/{orderCode}")
|
||||
public RestApiResponse<?> notification_start_charge_result(@RequestParam("orderCode") String orderCode) {
|
||||
logger.info("【{}】推送启动充电结果 params:{}", this.getClass().getSimpleName(), orderCode);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String result = platformLogic.notificationStartChargeResult(orderCode);
|
||||
logger.info("【{}】推送启动充电结果 result:{}", this.getClass().getSimpleName(), result);
|
||||
response = new RestApiResponse<>(result);
|
||||
}catch (BusinessException e) {
|
||||
logger.error("【{}】推送启动充电结果 error",this.getClass().getSimpleName(), e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
}catch (Exception e) {
|
||||
logger.error("【{}】推送启动充电结果 error", this.getClass().getSimpleName(), e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("【{}】推送启动充电结果 result:{}", this.getClass().getSimpleName(), response);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电状态
|
||||
* http://localhost:8080/LianLian/query_equip_charge_status/{startChargeSeq}
|
||||
@@ -399,7 +425,7 @@ public class LianLianController extends ThirdPartyBaseController {
|
||||
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryEquipChargeStatus(queryEquipChargeStatusDTO);
|
||||
|
||||
logger.info("{}-查询充电状态 result:{}", platformName, JSON.toJSONString(map));
|
||||
return CommonResult.success(0, "查询充电状态成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-查询充电状态 error", platformName, e);
|
||||
@@ -435,7 +461,7 @@ public class LianLianController extends ThirdPartyBaseController {
|
||||
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryStopCharge(queryStartChargeDTO);
|
||||
|
||||
logger.info("{}-请求停止充电 result:{}", platformName, JSON.toJSONString(map));
|
||||
return CommonResult.success(0, "请求停止充电成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-请求停止充电 error", platformName, e);
|
||||
@@ -472,7 +498,7 @@ public class LianLianController extends ThirdPartyBaseController {
|
||||
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.notificationOrderSettlementInfo(pushOrderSettlementDTO);
|
||||
|
||||
logger.info("{}-推送订单结算信息 result:{}", platformName, JSON.toJSONString(map));
|
||||
return CommonResult.success(0, "推送订单结算信息成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.info("{}-推送订单结算信息 error:", platformName, e);
|
||||
@@ -481,6 +507,32 @@ public class LianLianController extends ThirdPartyBaseController {
|
||||
return CommonResult.failed("推送订单结算信息发生异常");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 推送充电状态
|
||||
* http://localhost:8080/hainan/notificationEquipChargeStatus
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/notification_equip_charge_status/{orderCode}")
|
||||
public RestApiResponse<?> notification_equip_charge_status(@PathVariable("orderCode") String orderCode) {
|
||||
logger.info("推送充电状态 params:{}", orderCode);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String result = platformLogic.notificationEquipChargeStatus(orderCode);
|
||||
logger.info("推送充电状态 result:{}", result);
|
||||
response = new RestApiResponse<>(result);
|
||||
}catch (BusinessException e) {
|
||||
logger.error("推送充电状态 error",e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
}catch (Exception e) {
|
||||
logger.error("推送充电状态 error", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("推送充电状态 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
@GetMapping("/pushStationFee/{stationId}")
|
||||
public RestApiResponse<?> pushStationFee(@PathVariable("stationId") String stationId) {
|
||||
RestApiResponse<?> response = null;
|
||||
@@ -494,4 +546,25 @@ public class LianLianController extends ThirdPartyBaseController {
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 充电订单信息推送
|
||||
*/
|
||||
@PostMapping("/v1/notification_charge_order_info")
|
||||
public RestApiResponse<?> notification_charge_order_info(@RequestBody QueryOrderDTO dto) {
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String result = platformLogic.pushOrderInfo(dto);
|
||||
response = new RestApiResponse<>(result);
|
||||
}catch (BusinessException e){
|
||||
logger.error("推送充电订单信息 error",e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
}catch (Exception e) {
|
||||
logger.error("推送充电订单信息 error", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("推送充电订单信息 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user