mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-03 21:48:13 +08:00
update
This commit is contained in:
@@ -208,4 +208,14 @@ public class SiChuanController extends ThirdPartyBaseController {
|
|||||||
return CommonResult.success(0 , "推送充电站信息成功!" , s , null);
|
return CommonResult.success(0 , "推送充电站信息成功!" , s , null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,16 +167,42 @@ public class NotificationService {
|
|||||||
try {
|
try {
|
||||||
// 根据平台类型获取Service
|
// 根据平台类型获取Service
|
||||||
ThirdPartyPlatformService platformService = ThirdPartyPlatformFactory.getInvokeStrategy(secretInfoVO.getPlatformType());
|
ThirdPartyPlatformService platformService = ThirdPartyPlatformFactory.getInvokeStrategy(secretInfoVO.getPlatformType());
|
||||||
|
String type = secretInfoVO.getPlatformType();
|
||||||
|
|
||||||
//充电订单信息推送
|
//充电订单信息推送
|
||||||
platformService.notificationChargeOrderInfo(orderCode, secretInfoVO);
|
//判断实现此接口没有
|
||||||
|
// 25 , 20 ,17 ,18,7,24,3,1,10,13,26,16,23,6, 21,15,2
|
||||||
|
if(type.equals("25") || type.equals("17") ||type.equals("20") || type.equals("7") ||
|
||||||
|
type.equals("24") || type.equals("3") || type.equals("1")
|
||||||
|
|| type.equals("10") || type.equals("13") || type.equals("26") || type.equals("16")
|
||||||
|
|| type.equals("23") || type.equals("6") || type.equals("21") || type.equals("15") || type.equals("2")){
|
||||||
|
platformService.notificationChargeOrderInfo(orderCode, secretInfoVO);
|
||||||
|
}
|
||||||
|
|
||||||
//订单信息推送
|
//订单信息推送
|
||||||
platformService.notificationChargeOrderInfo(orderCode);
|
//12,7,1,10,13,11,6
|
||||||
|
if(type.equals("12") || type.equals("7") || type.equals("1") || type.equals("10") ||
|
||||||
|
type.equals("13") || type.equals("11") || type.equals("6")){
|
||||||
|
platformService.notificationChargeOrderInfo(orderCode);
|
||||||
|
}
|
||||||
|
|
||||||
//停止充电结果推送
|
//停止充电结果推送
|
||||||
platformService.notificationStopChargeResult(orderCode);
|
//25 , 7,1,23,6,4,2
|
||||||
|
if(type.equals("25") || type.equals("7") || type.equals("1") ||
|
||||||
|
type.equals("23") || type.equals("6") || type.equals("4") || type.equals("2")){
|
||||||
|
platformService.notificationStopChargeResult(orderCode);
|
||||||
|
}
|
||||||
|
|
||||||
//推送充换电站用能统计信息
|
//推送充换电站用能统计信息
|
||||||
platformService.notificationOperationStatsInfo(stationId);
|
//18,10,13,26
|
||||||
|
if(type.equals("18") || type.equals("10") || type.equals("13") || type.equals("26")){
|
||||||
|
platformService.notificationOperationStatsInfo(stationId);
|
||||||
|
}
|
||||||
//推送充电账单信息
|
//推送充电账单信息
|
||||||
platformService.notificationPayOrderInfo(orderCode);
|
//25
|
||||||
|
if(type.equals("25")){
|
||||||
|
platformService.notificationPayOrderInfo(orderCode);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("充电订单信息推送error", e);
|
logger.error("充电订单信息推送error", e);
|
||||||
@@ -184,6 +210,9 @@ public class NotificationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void commonPushStartChargeResult(NotificationDTO dto) {
|
public void commonPushStartChargeResult(NotificationDTO dto) {
|
||||||
logger.info("开始调用commonPushStartChargeResult接口");
|
logger.info("开始调用commonPushStartChargeResult接口");
|
||||||
String stationId = dto.getStationId();
|
String stationId = dto.getStationId();
|
||||||
|
|||||||
@@ -510,14 +510,8 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
// 获取令牌
|
// 获取令牌
|
||||||
//使用对方的密钥配置信息和我方的operatorId
|
//使用对方的密钥配置信息和我方的operatorId
|
||||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||||
//使用我方的密钥配置信息和我方的operatorId
|
|
||||||
String token1 = getToken(urlAddress, operatorId, operatorSecret1, dataSecretIv1, signSecret1, dataSecret1);
|
|
||||||
//使用对方的密钥配置信息和对方的operatorId
|
|
||||||
String token2 = getToken(urlAddress, operatorId1, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
|
||||||
|
|
||||||
log.info("token : " + token);
|
log.info("token : " + token);
|
||||||
log.info("token1 : " + token1);
|
|
||||||
log.info("token2 : " + token2);
|
|
||||||
|
|
||||||
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user