mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update
This commit is contained in:
@@ -47,13 +47,14 @@ public class WeiWangKuaiDianController extends ThirdPartyBaseController {
|
||||
*/
|
||||
@PostMapping("/v1/query_token")
|
||||
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-请求令牌 params:{}", platformName, JSON.toJSONString(dto));
|
||||
logger.info("宁波平台请求令牌 params:{}", JSON.toJSONString(dto));
|
||||
try {
|
||||
// Map<String, String> map = zdlService.generateToken(dto);
|
||||
Map<String, String> map = platformLogic.queryToken(dto);
|
||||
logger.info("{}-请求令牌, params:{}, result:{}", platformName, JSON.toJSONString(dto) , JSON.toJSONString(map));
|
||||
return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig"));
|
||||
logger.info("宁波平台请求令牌 result:{}", JSON.toJSONString(map));
|
||||
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-获取token接口, 异常, params:{}", platformName, JSON.toJSONString(dto), e);
|
||||
logger.error("宁波平台 请求令牌接口 异常");
|
||||
return CommonResult.failed("获取token发生异常");
|
||||
}
|
||||
}
|
||||
@@ -310,7 +311,7 @@ public class WeiWangKuaiDianController extends ThirdPartyBaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/notification_start_charge_result")
|
||||
public RestApiResponse<?> notificationStartChargeResult(@RequestParam("orderCode") String orderCode) {
|
||||
public RestApiResponse<?> notification_start_charge_result(@RequestParam("orderCode") String orderCode) {
|
||||
logger.info("【{}】推送启动充电结果 params:{}", this.getClass().getSimpleName(), orderCode);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
@@ -334,7 +335,7 @@ public class WeiWangKuaiDianController extends ThirdPartyBaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v1/query_equip_charge_status")
|
||||
public CommonResult<?> queryEquipChargeStatus(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
|
||||
public CommonResult<?> query_equip_charge_status(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-查询充电状态 params:{}", platformName, JSON.toJSONString(dto));
|
||||
try {
|
||||
// 校验令牌
|
||||
@@ -371,8 +372,8 @@ public class WeiWangKuaiDianController extends ThirdPartyBaseController {
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/notificationEquipChargeStatus/{orderCode}")
|
||||
public RestApiResponse<?> notificationEquipChargeStatus(@PathVariable("orderCode") String orderCode) {
|
||||
@GetMapping("/v1/notification_equip_charge_status")
|
||||
public RestApiResponse<?> notification_equip_charge_status(@PathVariable("orderCode") String orderCode) {
|
||||
logger.info("推送充电状态 params:{}", orderCode);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
@@ -433,7 +434,7 @@ public class WeiWangKuaiDianController extends ThirdPartyBaseController {
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/notificationStopChargeResult/{orderCode}")
|
||||
@GetMapping("/v1/notification_stop_charge_result/{orderCode}")
|
||||
public RestApiResponse<?> notificationStopChargeResult(@PathVariable("orderCode") String orderCode) {
|
||||
logger.info("推送停止充电结果 params:{}", orderCode);
|
||||
RestApiResponse<?> response = null;
|
||||
@@ -454,7 +455,7 @@ public class WeiWangKuaiDianController extends ThirdPartyBaseController {
|
||||
/**
|
||||
* 充电订单信息推送
|
||||
*/
|
||||
@PostMapping("/notificationChargeOrderInfo")
|
||||
@PostMapping("/v1/notification_charge_order_info")
|
||||
public AjaxResult notificationChargeOrderInfo(@RequestBody NotificationDTO dto) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
@@ -470,25 +471,6 @@ public class WeiWangKuaiDianController extends ThirdPartyBaseController {
|
||||
return result;
|
||||
}
|
||||
|
||||
//TODO 接口待完善
|
||||
@PostMapping("/v1/check_charge_orders/{orderCode}")
|
||||
public RestApiResponse<?> checkChargeOrders(@PathVariable String orderCode) {
|
||||
logger.info("{}-检查充电订单 params:{}", platformName, JSON.toJSONString(orderCode));
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String result = platformLogic.checkChargeOrders(orderCode);
|
||||
response = new RestApiResponse<>(result);
|
||||
}catch (BusinessException e) {
|
||||
logger.error("{}-检查充电订单 error", platformName, e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
}catch (Exception e) {
|
||||
logger.error("{}-检查充电订单 error", platformName, e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("{}-检查充电订单 result:{}", platformName, response);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user