新增 宁夏平台controller

This commit is contained in:
Lemon
2024-05-30 09:38:29 +08:00
parent 40a929eebd
commit f08de6dd54
5 changed files with 148 additions and 5 deletions

View File

@@ -4,6 +4,8 @@ import com.alibaba.fastjson2.JSON;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.enums.thirdparty.ThirdPartyReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
import com.jsowell.pile.dto.QueryOperatorInfoDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.pile.thirdparty.CommonParamsDTO;
@@ -11,10 +13,7 @@ import com.jsowell.thirdparty.lianlian.common.CommonResult;
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
@@ -156,4 +155,57 @@ public class NingXiaController extends ThirdPartyBaseController {
}
/**
* 推送充电设备接口状态信息
* @param dto
* @return
*/
@PostMapping("/v1/supervise_notification_station_status")
public RestApiResponse<?> superviseNotificationStationStatus(@RequestBody PushRealTimeInfoDTO dto) {
RestApiResponse<?> response = null;
try {
String result = platformLogic.notificationStationStatus(dto);
response = new RestApiResponse<>(result);
} catch (Exception e) {
logger.error("宁夏平台推送充电设备接口状态信息 error", e);
return new RestApiResponse<>(e);
}
return response;
}
/**
* 推送充电状态信息
* @param dto
* @return
*/
@GetMapping("/v1/supervise_notification_equip_charge_status/{orderCode}")
public RestApiResponse<?> superviseNotificationEquipChargeStatus(@PathVariable("orderCode") String orderCode) {
RestApiResponse<?> response = null;
try {
String result = platformLogic.notificationEquipChargeStatus(orderCode);
response = new RestApiResponse<>(result);
} catch (Exception e) {
logger.error("宁夏平台推送充电状态信息 error", e);
return new RestApiResponse<>(e);
}
return response;
}
/**
* 推送充电站历史充电订单信息
* @param orderCode
* @return
*/
@GetMapping("/v1/supervise_notification_equip_charge_status/{orderCode}")
public RestApiResponse<?> notificationChargeOrderInfoHistory(@PathVariable("orderCode") String orderCode) {
RestApiResponse<?> response = null;
try {
String result = platformLogic.notificationChargeOrderInfoHistory(orderCode);
response = new RestApiResponse<>(result);
} catch (Exception e) {
logger.error("宁夏平台推送充电站历史充电订单信息 error", e);
return new RestApiResponse<>(e);
}
return response;
}
}