update 联联测试接口

This commit is contained in:
Lemon
2023-05-26 10:11:05 +08:00
parent 742b4a1b02
commit e35fe5f6d3

View File

@@ -88,6 +88,57 @@ public class LianLianController extends BaseController {
return response;
}
/**
* 推送订单信息
* @param orderCode
* @return
*/
@GetMapping("/pushOrderInfo/{orderCode}")
public RestApiResponse<?> pushOrderInfo(@PathVariable("orderCode")String orderCode) {
logger.info("联联平台推送订单信息 params:{}", orderCode);
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(orderCode)) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
}
String result = lianLianService.pushOrderInfo(orderCode);
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;
}
/**
* 设备充电中状态变化推送
* @return
*/
@GetMapping("/pushPileChargeStatusChange/{orderCode}")
public RestApiResponse<?> pushPileChargeStatusChange(@PathVariable("orderCode")String orderCode) {
logger.info("联联平台设备充电中状态变化推送 params:{}", orderCode);
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(orderCode)) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
}
String result = lianLianService.pushPileChargeStatusChange(orderCode);
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;
}
/**
* 联联平台查询充电站信息
* http://localhost:8080/LianLian/query_stations_info