mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-04 18:10:10 +08:00
新增 甬城泊车相关接口、controller
This commit is contained in:
@@ -50,10 +50,10 @@ public class YCBCController extends BaseController {
|
||||
try {
|
||||
Map<String, String> map = ycbcService.generateToken(dto);
|
||||
logger.info("甬城泊车平台请求令牌 result:{}", JSONObject.toJSONString(map));
|
||||
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.YCBCSuccess(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
logger.error("甬城泊车平台 请求令牌接口 异常");
|
||||
return CommonResult.failed("获取token发生异常");
|
||||
return CommonResult.YCBCFailed("获取token发生异常");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,13 +72,13 @@ public class YCBCController extends BaseController {
|
||||
String token = request.getHeader("Authorization");
|
||||
if (!JWTUtils.checkThirdPartyToken(token)) {
|
||||
// 校验失败
|
||||
return CommonResult.failed("令牌校验错误");
|
||||
return CommonResult.YCBCFailed("令牌校验错误");
|
||||
}
|
||||
// 校验签名
|
||||
Map<String, String> resultMap = lianLianService.checkoutSign(dto);
|
||||
if (resultMap == null) {
|
||||
// 签名错误
|
||||
return CommonResult.failed("签名校验错误");
|
||||
return CommonResult.YCBCFailed("签名校验错误");
|
||||
}
|
||||
String operatorSecret = resultMap.get("OperatorSecret");
|
||||
String dataString = resultMap.get("Data");
|
||||
@@ -92,12 +92,12 @@ public class YCBCController extends BaseController {
|
||||
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
|
||||
Map<String, String> map = ycbcService.queryStationsInfo(queryStationInfoDTO);
|
||||
|
||||
return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.YCBCSuccess(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.info("甬城泊车平台查询充电站信息 error:", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
return CommonResult.failed("查询充电站信息发生异常");
|
||||
return CommonResult.YCBCFailed("查询充电站信息发生异常");
|
||||
}
|
||||
|
||||
|
||||
@@ -115,13 +115,13 @@ public class YCBCController extends BaseController {
|
||||
String token = request.getHeader("Authorization");
|
||||
if (!JWTUtils.checkThirdPartyToken(token)) {
|
||||
// 校验失败
|
||||
return CommonResult.failed("令牌校验错误");
|
||||
return CommonResult.YCBCFailed("令牌校验错误");
|
||||
}
|
||||
// 校验签名
|
||||
Map<String, String> resultMap = lianLianService.checkoutSign(dto);
|
||||
if (resultMap == null) {
|
||||
// 签名错误
|
||||
return CommonResult.failed("签名校验错误");
|
||||
return CommonResult.YCBCFailed("签名校验错误");
|
||||
}
|
||||
String operatorSecret = resultMap.get("OperatorSecret");
|
||||
String dataString = resultMap.get("Data");
|
||||
@@ -135,12 +135,12 @@ public class YCBCController extends BaseController {
|
||||
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
|
||||
Map<String, String> map = ycbcService.queryStationStatus(queryStationInfoDTO);
|
||||
|
||||
return CommonResult.success(0, "查询充电站状态信息成功!", map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.YCBCSuccess(0, "查询充电站状态信息成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.info("甬城泊车平台查询充电站状态信息 error:", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
return CommonResult.failed("查询充电站状态信息发生异常");
|
||||
return CommonResult.YCBCFailed("查询充电站状态信息发生异常");
|
||||
}
|
||||
|
||||
|
||||
@@ -210,13 +210,13 @@ public class YCBCController extends BaseController {
|
||||
String token = request.getHeader("Authorization");
|
||||
if (!JWTUtils.checkThirdPartyToken(token)) {
|
||||
// 校验失败
|
||||
return CommonResult.failed("令牌校验错误");
|
||||
return CommonResult.YCBCFailed("令牌校验错误");
|
||||
}
|
||||
// 校验签名
|
||||
Map<String, String> resultMap = lianLianService.checkoutSign(dto);
|
||||
if (resultMap == null) {
|
||||
// 签名错误
|
||||
return CommonResult.failed("签名校验错误");
|
||||
return CommonResult.YCBCFailed("签名校验错误");
|
||||
}
|
||||
String operatorSecret = resultMap.get("OperatorSecret");
|
||||
String dataString = resultMap.get("Data");
|
||||
@@ -230,12 +230,12 @@ public class YCBCController extends BaseController {
|
||||
queryEquipmentDTO.setOperatorID(dto.getOperatorID());
|
||||
Map<String, String> map = ycbcService.queryEquipAuth(queryEquipmentDTO);
|
||||
|
||||
return CommonResult.success(0, "请求设备认证成功!", map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.YCBCSuccess(0, "请求设备认证成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.info("甬城泊车平台请求设备认证 error:", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
return CommonResult.failed("请求设备认证发生异常");
|
||||
return CommonResult.YCBCFailed("请求设备认证发生异常");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -252,13 +252,13 @@ public class YCBCController extends BaseController {
|
||||
String token = request.getHeader("Authorization");
|
||||
if (!JWTUtils.checkThirdPartyToken(token)) {
|
||||
// 校验失败
|
||||
return CommonResult.failed("令牌校验错误");
|
||||
return CommonResult.YCBCFailed("令牌校验错误");
|
||||
}
|
||||
// 校验签名
|
||||
Map<String, String> resultMap = lianLianService.checkoutSign(dto);
|
||||
if (resultMap == null) {
|
||||
// 签名错误
|
||||
return CommonResult.failed("签名校验错误");
|
||||
return CommonResult.YCBCFailed("签名校验错误");
|
||||
}
|
||||
String operatorSecret = resultMap.get("OperatorSecret");
|
||||
String dataString = resultMap.get("Data");
|
||||
@@ -272,11 +272,11 @@ public class YCBCController extends BaseController {
|
||||
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
|
||||
Map<String, String> map = ycbcService.queryStartCharge(queryStartChargeDTO);
|
||||
|
||||
return CommonResult.success(0, "请求启动充电成功!", map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.YCBCSuccess(0, "请求启动充电成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("甬城泊车平台请求启动充电 error", e);
|
||||
}
|
||||
return CommonResult.failed("请求启动充电发生异常");
|
||||
return CommonResult.YCBCFailed("请求启动充电发生异常");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -293,13 +293,13 @@ public class YCBCController extends BaseController {
|
||||
String token = request.getHeader("Authorization");
|
||||
if (!JWTUtils.checkThirdPartyToken(token)) {
|
||||
// 校验失败
|
||||
return CommonResult.failed("令牌校验错误");
|
||||
return CommonResult.YCBCFailed("令牌校验错误");
|
||||
}
|
||||
// 校验签名
|
||||
Map<String, String> resultMap = lianLianService.checkoutSign(dto);
|
||||
if (resultMap == null) {
|
||||
// 签名错误
|
||||
return CommonResult.failed("签名校验错误");
|
||||
return CommonResult.YCBCFailed("签名校验错误");
|
||||
}
|
||||
String operatorSecret = resultMap.get("OperatorSecret");
|
||||
String dataString = resultMap.get("Data");
|
||||
@@ -313,11 +313,11 @@ public class YCBCController extends BaseController {
|
||||
queryEquipChargeStatusDTO.setOperatorID(dto.getOperatorID());
|
||||
Map<String, String> map = ycbcService.queryEquipChargeStatus(queryEquipChargeStatusDTO);
|
||||
|
||||
return CommonResult.success(0, "查询充电状态成功!", map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.YCBCSuccess(0, "查询充电状态成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("甬城泊车平台查询充电状态 error", e);
|
||||
}
|
||||
return CommonResult.failed("甬城泊车平台查询充电状态发生异常");
|
||||
return CommonResult.YCBCFailed("甬城泊车平台查询充电状态发生异常");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -358,13 +358,13 @@ public class YCBCController extends BaseController {
|
||||
String token = request.getHeader("Authorization");
|
||||
if (!JWTUtils.checkThirdPartyToken(token)) {
|
||||
// 校验失败
|
||||
return CommonResult.failed("令牌校验错误");
|
||||
return CommonResult.YCBCFailed("令牌校验错误");
|
||||
}
|
||||
// 校验签名
|
||||
Map<String, String> resultMap = lianLianService.checkoutSign(dto);
|
||||
if (resultMap == null) {
|
||||
// 签名错误
|
||||
return CommonResult.failed("签名校验错误");
|
||||
return CommonResult.YCBCFailed("签名校验错误");
|
||||
}
|
||||
String operatorSecret = resultMap.get("OperatorSecret");
|
||||
String dataString = resultMap.get("Data");
|
||||
@@ -378,11 +378,11 @@ public class YCBCController extends BaseController {
|
||||
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
|
||||
Map<String, String> map = ycbcService.queryStopCharge(queryStartChargeDTO);
|
||||
|
||||
return CommonResult.success(0, "请求停止充电成功!", map.get("Data"), map.get("Sig"));
|
||||
return CommonResult.YCBCSuccess(0, "请求停止充电成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("甬城泊车平台请求停止充电 error", e);
|
||||
}
|
||||
return CommonResult.failed("甬城泊车平台请求停止充电发生异常");
|
||||
return CommonResult.YCBCFailed("甬城泊车平台请求停止充电发生异常");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.service.PileService;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.nanrui.service.NRService;
|
||||
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
|
||||
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -66,6 +67,9 @@ public class PileStationInfoController extends BaseController {
|
||||
@Autowired
|
||||
private NRService nrService;
|
||||
|
||||
@Autowired
|
||||
private YCBCService ycbcService;
|
||||
|
||||
@Autowired
|
||||
private IThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||
|
||||
@@ -299,6 +303,10 @@ public class PileStationInfoController extends BaseController {
|
||||
// 江苏省平台
|
||||
result = nrService.pushStationInfo(dto);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), dto.getThirdPartyType())) {
|
||||
// 甬城泊车平台
|
||||
result = ycbcService.pushStationInfo(dto);
|
||||
}
|
||||
response = new RestApiResponse<>(result);
|
||||
}catch (BusinessException e) {
|
||||
logger.error("推送第三方平台充电站信息 error",e);
|
||||
|
||||
@@ -13,6 +13,7 @@ public enum ThirdPlatformTypeEnum {
|
||||
LIAN_LIAN_PLATFORM("1", "联联平台"),
|
||||
ZHONG_DIAN_LIAN_PLATFORM("2", "中电联平台"),
|
||||
JIANG_SU_PLATFORM("3", "江苏省平台"),
|
||||
YONG_CHENG_BO_CHE("4", "甬城泊车平台"),
|
||||
;
|
||||
|
||||
private String code;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.jsowell.netty.handler;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.jsowell.common.core.domain.ykc.YKCDataProtocol;
|
||||
import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.enums.ykc.OrderStatusEnum;
|
||||
import com.jsowell.common.util.BytesUtil;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
@@ -15,6 +16,7 @@ import com.jsowell.pile.service.IThirdPartyStationRelationService;
|
||||
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -44,6 +46,9 @@ public class ChargeEndHandler extends AbstractHandler{
|
||||
@Autowired
|
||||
private LianLianService lianLianService;
|
||||
|
||||
@Autowired
|
||||
private YCBCService ycbcService;
|
||||
|
||||
@Autowired
|
||||
private IThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||
|
||||
@@ -137,10 +142,19 @@ public class ChargeEndHandler extends AbstractHandler{
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo info = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
if (Objects.nonNull(relationInfo)) {
|
||||
if (Objects.isNull(relationInfo)) {
|
||||
return null;
|
||||
}
|
||||
// 联联平台
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), relationInfo.getThirdPartyType())) {
|
||||
// 推送停止充电结果
|
||||
lianLianService.pushStopChargeResult(orderInfo.getOrderCode());
|
||||
}
|
||||
// 甬城泊车平台
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), relationInfo.getThirdPartyType())) {
|
||||
ycbcService.pushStopChargeResult(orderInfo.getOrderCode());
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("联联平台推送停止充电结果异常", e);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.lutongyunting.service.LTYTService;
|
||||
import com.jsowell.thirdparty.nanrui.service.NRService;
|
||||
import com.jsowell.thirdparty.ruanjie.service.RJService;
|
||||
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
|
||||
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -87,6 +88,9 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
|
||||
@Autowired
|
||||
private NRService nrService;
|
||||
|
||||
@Autowired
|
||||
private YCBCService ycbcService;
|
||||
|
||||
@Autowired
|
||||
private IThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||
|
||||
@@ -695,6 +699,10 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
|
||||
// 推送订单信息
|
||||
nrService.pushOrderInfo(orderBasicInfo.getOrderCode());
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), thirdPartyType)) {
|
||||
// 中电联
|
||||
ycbcService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
|
||||
}
|
||||
// 调用相关接口
|
||||
} catch (Exception e) {
|
||||
log.error("联联平台 推送订单信息发生异常", e);
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.nanrui.service.NRService;
|
||||
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
|
||||
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -62,6 +63,9 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
@Autowired
|
||||
private LianLianService lianLianService;
|
||||
|
||||
@Autowired
|
||||
private YCBCService ycbcService;
|
||||
|
||||
@Autowired
|
||||
private IThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||
|
||||
@@ -345,6 +349,14 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
String result = nrService.pushPileStatus(realTimeMonitorData);
|
||||
log.info("推送江苏省平台实时数据 result:{}", result);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), relationInfo.getThirdPartyType())) {
|
||||
// 甬城泊车
|
||||
log.info("推送甬城泊车平台实时数据 params: orderBasicInfo:{}", JSON.toJSONString(orderInfo));
|
||||
// 设备状态变化推送 notification_stationStatus
|
||||
ycbcService.notificationStationStatus(pileConnectorCode, connectorStatus);
|
||||
// 推送充电状态
|
||||
ycbcService.pushChargeStatus(orderInfo.getOrderCode());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("推送第三方平台 实时数据 异常", e);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ public class CommonResult<T> {
|
||||
|
||||
private String sig;
|
||||
|
||||
private String portName;
|
||||
|
||||
protected CommonResult() {
|
||||
|
||||
}
|
||||
@@ -38,6 +40,14 @@ public class CommonResult<T> {
|
||||
this.sig = sig;
|
||||
}
|
||||
|
||||
protected CommonResult(long ret, String msg, T data, String sig, String portName) {
|
||||
this.ret = ret;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
this.sig = sig;
|
||||
this.portName = portName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功返回结果
|
||||
*
|
||||
@@ -49,6 +59,16 @@ public class CommonResult<T> {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMsg(), data, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 甬城泊车成功返回结果
|
||||
* @param data
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> YCBCSuccess(T data) {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMsg(), data, null, "wcc-pro");
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功返回结果
|
||||
*
|
||||
@@ -60,11 +80,21 @@ public class CommonResult<T> {
|
||||
public static <T> CommonResult<T> success(T data, String message) {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), message, data, null);
|
||||
}
|
||||
// 甬城泊车成功返回结果
|
||||
public static <T> CommonResult<T> YCBCSuccess(T data, String message) {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), message, data, null, "wcc-pro");
|
||||
}
|
||||
|
||||
|
||||
public static <T> CommonResult<T> success(Integer ret, String msg, T data, String sig) {
|
||||
return new CommonResult<T>(ret, msg, data, sig);
|
||||
}
|
||||
|
||||
// 甬城泊车成功返回结果
|
||||
public static <T> CommonResult<T> YCBCSuccess(Integer ret, String msg, T data, String sig) {
|
||||
return new CommonResult<T>(ret, msg, data, sig, "wcc-pro");
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
@@ -76,6 +106,10 @@ public class CommonResult<T> {
|
||||
return new CommonResult<T>(resultCode.getCode(), resultCode.getMsg(), null, null);
|
||||
}
|
||||
|
||||
public static <T> CommonResult<T> YCBCFailed(ResultCode resultCode) {
|
||||
return new CommonResult<T>(resultCode.getCode(), resultCode.getMsg(), null, null, "wcc-pro");
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回
|
||||
*
|
||||
@@ -88,6 +122,10 @@ public class CommonResult<T> {
|
||||
return new CommonResult<T>(code, msg, null, null);
|
||||
}
|
||||
|
||||
public static <T> CommonResult<T> YCBCFailed(long code, String msg, String portName) {
|
||||
return new CommonResult<T>(code, msg, null, null, portName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
@@ -99,6 +137,10 @@ public class CommonResult<T> {
|
||||
return failed(ResultCode.ERROR.getCode(), msg);
|
||||
}
|
||||
|
||||
public static <T> CommonResult<T> YCBCFailed(String msg) {
|
||||
return YCBCFailed(ResultCode.ERROR.getCode(), msg, "wcc-pro");
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
@@ -109,6 +151,10 @@ public class CommonResult<T> {
|
||||
return failed(ResultCode.ERROR);
|
||||
}
|
||||
|
||||
public static <T> CommonResult<T> YCBCFailed() {
|
||||
return YCBCFailed(ResultCode.ERROR);
|
||||
}
|
||||
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
@@ -141,4 +187,12 @@ public class CommonResult<T> {
|
||||
public void setSig(String sig) {
|
||||
this.sig = sig;
|
||||
}
|
||||
|
||||
public String getPortName() {
|
||||
return portName;
|
||||
}
|
||||
|
||||
public void setPortName(String portName) {
|
||||
this.portName = portName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,10 +217,10 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws UnsupportedEncodingException {
|
||||
String dataSecret = "vj3RWNsWIxT5MC2K";
|
||||
String dataSecretIV = "jjkySnGlM3pbOUki";
|
||||
String signSecret = "NbELMbWtbHikNSlu";
|
||||
String dataString = "HcKHxaIiuG7H/PUavhtbRg2CNRSJ6X7pTgwKJNdx768+fw0WLo+h5LZEWcAMAOy+DYBQRB6GE9rybFTTTA6dIL1c3OlIBjp/1yoomTNqMlY=";
|
||||
String dataSecret = "SPBNJ1Z5EQNmpK08"; // SPBNJ1Z5EQNmpK08
|
||||
String dataSecretIV = "peRoTcb2C7zqKeII"; // peRoTcb2C7zqKeII
|
||||
String signSecret = "sRjCDeokckFGpYpA"; // sRjCDeokckFGpYpA
|
||||
String dataString = "DLYTJz/I1OkVfqHDPEyF6g==";
|
||||
// 解密data
|
||||
byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes());
|
||||
String dataStr = new String(plainText, StandardCharsets.UTF_8);
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.jsowell.thirdparty.yongchengboche.service;
|
||||
|
||||
import com.jsowell.pile.dto.QueryEquipChargeStatusDTO;
|
||||
import com.jsowell.pile.dto.QueryEquipmentDTO;
|
||||
import com.jsowell.pile.dto.QueryStartChargeDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
|
||||
|
||||
@@ -108,4 +105,11 @@ public interface YCBCService {
|
||||
* @return
|
||||
*/
|
||||
String pushChargeOrderInfo(String orderCode);
|
||||
|
||||
/**
|
||||
* 推送充电站信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
String pushStationInfo(PushStationInfoDTO dto);
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.jsowell.thirdparty.yongchengboche.service.impl;
|
||||
|
||||
import com.jsowell.pile.dto.QueryEquipChargeStatusDTO;
|
||||
import com.jsowell.pile.dto.QueryEquipmentDTO;
|
||||
import com.jsowell.pile.dto.QueryStartChargeDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
|
||||
@@ -162,4 +159,14 @@ public class YCBCServiceImpl implements YCBCService {
|
||||
return lianLianService.pushChargeOrderInfo(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送充电站信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String pushStationInfo(PushStationInfoDTO dto) {
|
||||
return zdlService.pushStationInfo(dto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user