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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user