mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update
This commit is contained in:
@@ -2,11 +2,13 @@ package com.jsowell.api.thirdparty;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.dto.thirdparty.JCTCommonParamsDTO;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPartyReturnCodeEnum;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.bean.BeanUtils;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.lianlian.common.CommonResult;
|
||||
@@ -47,8 +49,8 @@ public class XDTController extends ThirdPartyBaseController {
|
||||
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
|
||||
try {
|
||||
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:{}" , platformName , map);
|
||||
return CommonResult.success(0 , "请求令牌成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-获取token接口, 异常, params:{}", platformName, JSON.toJSONString(dto), e);
|
||||
return CommonResult.failed("获取token发生异常");
|
||||
@@ -82,7 +84,7 @@ public class XDTController extends ThirdPartyBaseController {
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryStationsInfo(queryStationInfoDTO);
|
||||
|
||||
return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.success(0 , "请求令牌成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.info("{}-查询充电站信息 error:", platformName, e);
|
||||
}
|
||||
@@ -177,7 +179,7 @@ public class XDTController extends ThirdPartyBaseController {
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryQrcodeData(queryQrcodeDTO);
|
||||
|
||||
return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.success(0 , "请求令牌成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-二维码解析接口 error:", platformName, e);
|
||||
}
|
||||
@@ -213,7 +215,7 @@ public class XDTController extends ThirdPartyBaseController {
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryEquipAuth(queryEquipmentDTO);
|
||||
|
||||
return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.success(0 , "请求令牌成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-请求设备认证 error:", platformName, e);
|
||||
}
|
||||
@@ -250,7 +252,7 @@ public class XDTController extends ThirdPartyBaseController {
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryEquipBusinessPolicy(queryStartChargeDTO);
|
||||
|
||||
return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.success(0 , "请求令牌成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-查询业务策略信息结果 error:", platformName, e);
|
||||
}
|
||||
@@ -287,7 +289,7 @@ public class XDTController extends ThirdPartyBaseController {
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryEquipChargeStatus(queryEquipChargeStatusDTO);
|
||||
|
||||
return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.success(0 , "请求令牌成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-查询充电状态 error:", platformName, e);
|
||||
}
|
||||
@@ -326,7 +328,7 @@ public class XDTController extends ThirdPartyBaseController {
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryStationStatus(queryStationInfoDTO);
|
||||
|
||||
return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.success(0 , "请求令牌成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-查询充电站状态信息 error:", platformName, e);
|
||||
}
|
||||
@@ -365,7 +367,7 @@ public class XDTController extends ThirdPartyBaseController {
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryStartCharge(queryStartChargeDTO);
|
||||
|
||||
return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.success(0 , "请求令牌成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-请求启动充电 error:", platformName, e);
|
||||
}
|
||||
@@ -403,7 +405,7 @@ public class XDTController extends ThirdPartyBaseController {
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryStopCharge(queryStartChargeDTO);
|
||||
|
||||
return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.success(0 , "请求令牌成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-请求停止充电 error:", platformName, e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user