|
|
@@ -1,26 +1,30 @@
|
|
|
-package com.kym.service.enplus.impl;
|
|
|
+package com.kym.service.platform.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.extra.mail.MailUtil;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
+import com.kym.common.cache.PlatformCache;
|
|
|
+import com.kym.common.utils.CommUtil;
|
|
|
+import com.kym.common.utils.PlatformAesUtil;
|
|
|
+import com.kym.common.utils.PlatformConvertUtil;
|
|
|
import com.kym.entity.admin.ConnectorInfo;
|
|
|
import com.kym.entity.admin.EquipmentInfo;
|
|
|
import com.kym.entity.admin.MonitorLog;
|
|
|
import com.kym.entity.common.RedisKeys;
|
|
|
-import com.kym.entity.enplus.EnConnectorStatusInfo;
|
|
|
import com.kym.entity.miniapp.Account;
|
|
|
import com.kym.entity.miniapp.ChargeOrder;
|
|
|
import com.kym.entity.miniapp.WalletDetail;
|
|
|
+import com.kym.entity.platform.PlatformConnectorStatusInfo;
|
|
|
import com.kym.service.admin.ConnectorInfoService;
|
|
|
import com.kym.service.admin.EquipmentInfoService;
|
|
|
import com.kym.service.admin.MonitorLogService;
|
|
|
import com.kym.service.cache.KymCache;
|
|
|
-import com.kym.service.enplus.EnNotifyService;
|
|
|
-import com.kym.service.enplus.EnPlusService;
|
|
|
import com.kym.service.factory.DiscountStrategyFactory;
|
|
|
import com.kym.service.miniapp.*;
|
|
|
+import com.kym.service.platform.PlatformNotifyService;
|
|
|
import jakarta.annotation.PostConstruct;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
@@ -33,19 +37,18 @@ import java.math.BigDecimal;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.Map;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @author skyline
|
|
|
- * @description
|
|
|
- * @date 2023-08-04 14:26
|
|
|
+ * 接收处理互联互通平台推送信息
|
|
|
*/
|
|
|
|
|
|
@Service
|
|
|
-public class EnNotifyServiceImpl implements EnNotifyService {
|
|
|
- private static final Logger LOGGER = LoggerFactory.getLogger(EnNotifyServiceImpl.class);
|
|
|
+public class PlatformNotifyServiceImpl implements PlatformNotifyService {
|
|
|
+ private static final Logger LOGGER = LoggerFactory.getLogger(PlatformNotifyServiceImpl.class);
|
|
|
public final StringRedisTemplate redisTemplate;
|
|
|
- private final EnPlusService enPlusService;
|
|
|
private final ChargeOrderService chargeOrderService;
|
|
|
private final ChargeService chargeService;
|
|
|
private final AccountService accountService;
|
|
|
@@ -53,17 +56,16 @@ public class EnNotifyServiceImpl implements EnNotifyService {
|
|
|
private final MonitorLogService monitorLogService;
|
|
|
private final EquipmentInfoService equipmentInfoService;
|
|
|
private final ConnectorInfoService connectorInfoService;
|
|
|
-
|
|
|
private final UserStationService userStationService;
|
|
|
|
|
|
@Value("${kym.notify-email}")
|
|
|
private String notifyEmail;
|
|
|
|
|
|
- public EnNotifyServiceImpl(EnPlusService enPlusService, ChargeOrderService chargeOrderService,
|
|
|
- ChargeService chargeService, AccountService accountService, WalletDetailService walletDetailService,
|
|
|
- MonitorLogService monitorLogService, EquipmentInfoService equipmentInfoService,
|
|
|
- ConnectorInfoService connectorInfoService, StringRedisTemplate redisTemplate, UserStationService userStationService) {
|
|
|
- this.enPlusService = enPlusService;
|
|
|
+ public PlatformNotifyServiceImpl(ChargeOrderService chargeOrderService, ChargeService chargeService,
|
|
|
+ AccountService accountService, WalletDetailService walletDetailService,
|
|
|
+ MonitorLogService monitorLogService, EquipmentInfoService equipmentInfoService,
|
|
|
+ ConnectorInfoService connectorInfoService, StringRedisTemplate redisTemplate,
|
|
|
+ UserStationService userStationService) {
|
|
|
this.chargeOrderService = chargeOrderService;
|
|
|
this.chargeService = chargeService;
|
|
|
this.accountService = accountService;
|
|
|
@@ -80,31 +82,53 @@ public class EnNotifyServiceImpl implements EnNotifyService {
|
|
|
KymCache.INSTANCE.putConnectorId2Status(connectorInfoService.list().stream().collect(Collectors.toMap(ConnectorInfo::getConnectorId, ConnectorInfo::getStatus)));
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public String queryToken(String platformName, JSONObject json) {
|
|
|
+ var data = PlatformAesUtil.signValidation(platformName, json);
|
|
|
+ LOGGER.info("【{}互联互通平台推送】收到请求快与慢Token:{},解密数据:{}", platformName, json, data);
|
|
|
+ var platform = PlatformCache.INSTANCE.getPlatformByName(platformName);
|
|
|
+ // 查询缓存,存在则返回值和过期时间,不存在则重新生成并缓存
|
|
|
+ var token = redisTemplate.opsForValue().get(RedisKeys.PLATFORM_TOKEN + platformName);
|
|
|
+ // 过期时间
|
|
|
+ var ttl = redisTemplate.getExpire(RedisKeys.PLATFORM_TOKEN + platformName);
|
|
|
+ if (CommUtil.isEmptyOrNull(token)) {
|
|
|
+ token = IdUtil.simpleUUID();
|
|
|
+ ttl = 7 * 24 * 3600L;
|
|
|
+ redisTemplate.opsForValue().set(RedisKeys.PLATFORM_TOKEN + platformName, token, ttl, TimeUnit.SECONDS);
|
|
|
+ }
|
|
|
+
|
|
|
+ var params = """
|
|
|
+ {
|
|
|
+ "OperatorID":"%s",
|
|
|
+ "SuccStat":%d,
|
|
|
+ "AccessToken":"%s",
|
|
|
+ "TokenAvailableTime":%d,
|
|
|
+ "FailReason":%d
|
|
|
+ }
|
|
|
+ """.formatted(platform.getOperatorId(), 0, token, ttl, 0);
|
|
|
+ return PlatformAesUtil.encrypt(platform.getUserDataSecret(), platform.getUserDataSecretIv(), params);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* EN+ 充电站设备状态变化推送
|
|
|
*
|
|
|
+ * @param platformName
|
|
|
* @param json
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
@DS("db-admin")
|
|
|
- public String handleNotificationStationStatus(JSONObject json) {
|
|
|
- var data = enPlusService.signValidation(json);
|
|
|
- LOGGER.info("【EN+推送】收到充电桩设备状态变化推送:{},解密数据:{}", json, data);
|
|
|
+ public String handleNotificationStationStatus(String platformName, JSONObject json) {
|
|
|
+ var data = PlatformAesUtil.signValidation(platformName, json);
|
|
|
+ LOGGER.info("【{}互联互通平台推送】收到充电桩设备状态变化推送:{},解密数据:{}", platformName, json, data);
|
|
|
// 更新数据库,存入redis,发送邮件通知
|
|
|
- var connectorStatusInfo = JSONObject.parseObject(data).getJSONObject("ConnectorStatusInfo").toJavaObject(EnConnectorStatusInfo.class);
|
|
|
- var connectorId = connectorStatusInfo.getConnectorId();
|
|
|
+ var connectorStatusInfo = JSONObject.parseObject(data).getJSONObject("ConnectorStatusInfo").toJavaObject(PlatformConnectorStatusInfo.class);
|
|
|
+ var connectorId = PlatformConvertUtil.parse2LocalConnectorId(connectorStatusInfo.getConnectorId());
|
|
|
var equipmentId = connectorId.substring(0, 16);
|
|
|
|
|
|
- equipmentInfoService.lambdaUpdate()
|
|
|
- .eq(EquipmentInfo::getEquipmentId, equipmentId)
|
|
|
- .set(EquipmentInfo::getServiceStatus, connectorStatusInfo.getStatus())
|
|
|
- .update();
|
|
|
+ equipmentInfoService.lambdaUpdate().eq(EquipmentInfo::getEquipmentId, equipmentId).set(EquipmentInfo::getServiceStatus, connectorStatusInfo.getStatus()).update();
|
|
|
|
|
|
- connectorInfoService.lambdaUpdate()
|
|
|
- .eq(ConnectorInfo::getConnectorId, connectorId)
|
|
|
- .set(ConnectorInfo::getStatus, connectorStatusInfo.getStatus())
|
|
|
- .update();
|
|
|
+ connectorInfoService.lambdaUpdate().eq(ConnectorInfo::getConnectorId, connectorId).set(ConnectorInfo::getStatus, connectorStatusInfo.getStatus()).update();
|
|
|
|
|
|
|
|
|
var connectorStatus = connectorStatusInfo.getStatus();
|
|
|
@@ -112,12 +136,7 @@ public class EnNotifyServiceImpl implements EnNotifyService {
|
|
|
if (connectorStatus == 0) {
|
|
|
LOGGER.info("充电桩设备离线:{}", connectorStatusInfo.getConnectorId());
|
|
|
// 如果设备离线,则存入redis
|
|
|
- var monitorLog = new MonitorLog()
|
|
|
- .setStationId(KymCache.INSTANCE.getStationIdByEquipmentIdOrConnectorId(connectorStatusInfo.getConnectorId()))
|
|
|
- .setSn(connectorStatusInfo.getConnectorId())
|
|
|
- .setOfflineTime(LocalDateTime.now())
|
|
|
- .setType(2)
|
|
|
- .setOfflineStatus(connectorStatusInfo.getStatus());
|
|
|
+ var monitorLog = new MonitorLog().setStationId(KymCache.INSTANCE.getStationIdByEquipmentIdOrConnectorId(connectorStatusInfo.getConnectorId())).setSn(connectorStatusInfo.getConnectorId()).setOfflineTime(LocalDateTime.now()).setType(2).setOfflineStatus(connectorStatusInfo.getStatus());
|
|
|
monitorLogService.save(monitorLog);
|
|
|
|
|
|
// 离线设备放入队列,60分钟之后如果还未恢复则放入长时间离线设备集合中并发送提醒,上线后发送提醒
|
|
|
@@ -128,16 +147,12 @@ public class EnNotifyServiceImpl implements EnNotifyService {
|
|
|
var exist = redisTemplate.opsForSet().remove(RedisKeys.OFFLINE_EXPIRED, connectorStatusInfo.getConnectorId());
|
|
|
if ((isDelete != null && isDelete > 0) || (exist != null && exist > 0)) {
|
|
|
// 更新设备监控表
|
|
|
- monitorLogService.lambdaUpdate()
|
|
|
- .eq(MonitorLog::getSn, connectorStatusInfo.getConnectorId())
|
|
|
- .eq(MonitorLog::getIsRecover, MonitorLog.IS_RECOVER_未恢复) // 未恢复的记录
|
|
|
- .set(MonitorLog::getRecoverTime, LocalDateTime.now())
|
|
|
- .set(MonitorLog::getIsRecover, MonitorLog.IS_RECOVER_已恢复) // 设置为已恢复
|
|
|
+ monitorLogService.lambdaUpdate().eq(MonitorLog::getSn, connectorStatusInfo.getConnectorId()).eq(MonitorLog::getIsRecover, MonitorLog.IS_RECOVER_未恢复) // 未恢复的记录
|
|
|
+ .set(MonitorLog::getRecoverTime, LocalDateTime.now()).set(MonitorLog::getIsRecover, MonitorLog.IS_RECOVER_已恢复) // 设置为已恢复
|
|
|
.update();
|
|
|
}
|
|
|
if (exist != null && exist > 0) {
|
|
|
- MailUtil.send(notifyEmail, "【设备上线通知】", "站点:%s,设备%s恢复上线"
|
|
|
- .formatted(KymCache.INSTANCE.getStationNameByConnectorId(connectorStatusInfo.getConnectorId()), KymCache.INSTANCE.getShortIdByEquipmentIdOrConnectorId(connectorStatusInfo.getConnectorId())), false);
|
|
|
+ MailUtil.send(notifyEmail, "【设备上线通知】", "站点:%s,设备%s恢复上线".formatted(KymCache.INSTANCE.getStationNameByConnectorId(connectorStatusInfo.getConnectorId()), KymCache.INSTANCE.getShortIdByEquipmentIdOrConnectorId(connectorStatusInfo.getConnectorId())), false);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -148,29 +163,33 @@ public class EnNotifyServiceImpl implements EnNotifyService {
|
|
|
}
|
|
|
KymCache.INSTANCE.putConnectorId2Status(Map.of(connectorId, connectorStatus));
|
|
|
|
|
|
- return """
|
|
|
+ var params = """
|
|
|
{
|
|
|
"Status":%d
|
|
|
}
|
|
|
""".formatted(0);
|
|
|
+ var platform = PlatformCache.INSTANCE.getPlatformByName(platformName);
|
|
|
+ return PlatformAesUtil.encrypt(platform.getUserDataSecret(), platform.getUserDataSecretIv(), params);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* EN+ 推送启动充电结果
|
|
|
*
|
|
|
+ * @param platformName
|
|
|
* @param json
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@DS("db-miniapp")
|
|
|
- public String handleNotificationStartChargeResult(JSONObject json) {
|
|
|
- var data = enPlusService.signValidation(json);
|
|
|
- LOGGER.info("【EN+推送】收到启动充电结果推送:{},解密数据:{}", json, data);
|
|
|
+ public String handleNotificationStartChargeResult(String platformName, JSONObject json) {
|
|
|
+ var data = PlatformAesUtil.signValidation(platformName, json);
|
|
|
+ LOGGER.info("【{}互联互通平台推送】收到启动充电结果推送:{},解密数据:{}", platformName, json, data);
|
|
|
var obj = JSONObject.parseObject(data);
|
|
|
var startChargeSeq = obj.getString("StartChargeSeq");
|
|
|
var startChargeSeqStat = obj.getIntValue("StartChargeSeqStat");
|
|
|
- var connectorId = obj.getString("ConnectorID");
|
|
|
+ var connectorId = PlatformConvertUtil.parse2LocalConnectorId(obj.getString("ConnectorID"));
|
|
|
var startTime = LocalDateTime.parse(obj.getString("StartTime"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
|
// 更新订单状态
|
|
|
@@ -181,28 +200,31 @@ public class EnNotifyServiceImpl implements EnNotifyService {
|
|
|
updateWrapper.set("charge_status", startChargeSeqStat);
|
|
|
updateWrapper.set("start_time", startTime);
|
|
|
chargeOrderService.update(updateWrapper);
|
|
|
- return """
|
|
|
+ var params = """
|
|
|
{
|
|
|
"StartChargeSeq":"%s",
|
|
|
"SuccStat":%d,
|
|
|
"FailReason":%d
|
|
|
}
|
|
|
""".formatted(startChargeSeq, 0, 0);
|
|
|
+ var platform = PlatformCache.INSTANCE.getPlatformByName(platformName);
|
|
|
+ return PlatformAesUtil.encrypt(platform.getUserDataSecret(), platform.getUserDataSecretIv(), params);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 推送充电状态,1分钟推送一次
|
|
|
*
|
|
|
+ * @param platformName
|
|
|
* @param json
|
|
|
* @return
|
|
|
* @see com.kym.miniapp.jobs.EquipmentChargeStatusJob#executeMpUserRelationJob()
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public String handleNotificationEquipChargeStatus(JSONObject json) {
|
|
|
- var dataStr = enPlusService.signValidation(json);
|
|
|
+ public String handleNotificationEquipChargeStatus(String platformName, JSONObject json) {
|
|
|
+ var dataStr = PlatformAesUtil.signValidation(platformName, json);
|
|
|
var data = JSONObject.parseObject(dataStr);
|
|
|
- LOGGER.info("【EN+推送】 :{},解密数据:{}", json, data);
|
|
|
+ LOGGER.info("【{}互联互通平台推送】 :{},解密数据:{}", platformName, json, data);
|
|
|
var startChargeSeq = data.getString("StartChargeSeq");
|
|
|
var chargeOrder = chargeOrderService.getChargingOrderByStartChargeSeq(startChargeSeq);
|
|
|
// 更新订单信息
|
|
|
@@ -219,53 +241,59 @@ public class EnNotifyServiceImpl implements EnNotifyService {
|
|
|
redisTemplate.opsForHash().put(RedisKeys.CHARGE_ORDER_EQUIP_CHARGE_STATUS, startChargeSeq, JSONObject.toJSONString(chargeOrder));
|
|
|
// 将数据库写入操作放到定时任务中
|
|
|
// chargeOrderService.updateById(chargeOrder);
|
|
|
- return """
|
|
|
+ var params = """
|
|
|
{
|
|
|
"StartChargeSeq":"%s",
|
|
|
"SuccStat":%d
|
|
|
}
|
|
|
""".formatted(startChargeSeq, 0);
|
|
|
+ var platform = PlatformCache.INSTANCE.getPlatformByName(platformName);
|
|
|
+ return PlatformAesUtil.encrypt(platform.getUserDataSecret(), platform.getUserDataSecretIv(), params);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 推送停止充电结果
|
|
|
*
|
|
|
+ * @param platformName
|
|
|
* @param json
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public String handleNotificationStopChargeResult(JSONObject json) {
|
|
|
- var dataStr = enPlusService.signValidation(json);
|
|
|
+ public String handleNotificationStopChargeResult(String platformName, JSONObject json) {
|
|
|
+ var dataStr = PlatformAesUtil.signValidation(platformName, json);
|
|
|
var data = JSONObject.parseObject(dataStr);
|
|
|
- LOGGER.info("【EN+推送】收到停止充电结果推送:{},解密数据:{}", json, data);
|
|
|
+ LOGGER.info("【{}互联互通平台推送】收到停止充电结果推送:{},解密数据:{}", platformName, json, data);
|
|
|
var startChargeSeq = data.getString("StartChargeSeq");
|
|
|
var chargeOrder = chargeOrderService.getChargingOrderByStartChargeSeq(startChargeSeq);
|
|
|
if (data.containsKey("SuccStat") && data.getIntValue("SuccStat") == 0) {
|
|
|
chargeOrder.setChargeStatus(data.getIntValue("StartChargeSeqStat"));
|
|
|
chargeOrderService.updateById(chargeOrder);
|
|
|
}
|
|
|
- return """
|
|
|
+ var params = """
|
|
|
{
|
|
|
"StartChargeSeq":"%s",
|
|
|
"SuccStat":%d,
|
|
|
"FailReason":%d
|
|
|
}
|
|
|
""".formatted(startChargeSeq, 0, 0);
|
|
|
+ var platform = PlatformCache.INSTANCE.getPlatformByName(platformName);
|
|
|
+ return PlatformAesUtil.encrypt(platform.getUserDataSecret(), platform.getUserDataSecretIv(), params);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 推送充电订单信息(订单结算)
|
|
|
*
|
|
|
+ * @param platformName
|
|
|
* @param json
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
@DSTransactional(rollbackFor = Exception.class)
|
|
|
- public String handleNotificationChargeOrderInfo(JSONObject json) {
|
|
|
- var dataStr = enPlusService.signValidation(json);
|
|
|
+ public String handleNotificationChargeOrderInfo(String platformName, JSONObject json) {
|
|
|
+ var dataStr = PlatformAesUtil.signValidation(platformName, json);
|
|
|
var data = JSONObject.parseObject(dataStr);
|
|
|
- LOGGER.info("【EN+推送】收到充电订单信息推送:{},解密数据:{}", json, data);
|
|
|
+ LOGGER.info("【{}互联互通平台推送】收到充电订单信息推送:{},解密数据:{}", platformName, json, data);
|
|
|
var startChargeSeq = data.getString("StartChargeSeq");
|
|
|
var chargeOrder = chargeOrderService.getChargingOrderByStartChargeSeq(startChargeSeq);
|
|
|
|
|
|
@@ -275,16 +303,8 @@ public class EnNotifyServiceImpl implements EnNotifyService {
|
|
|
// EN+平台推送重试策略是当天失败第二天再推送一次,仅此一次。EN+订单页面可以多次手动推送,所以这里要先判断订单状态,避免重复处理。
|
|
|
if (chargeOrder.getChargeStatus() != ChargeOrder.CHARGE_STATUS_已结束 || chargeOrder.getOrderStatus() != ChargeOrder.ORDER_STATUS_成功) {
|
|
|
// 更新订单信息
|
|
|
- chargeOrder
|
|
|
- .setStartTime(LocalDateTime.parse(data.getString("StartTime"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))
|
|
|
- .setEndTime(LocalDateTime.parse(data.getString("EndTime"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))
|
|
|
- .setTotalPower(data.getDoubleValue("TotalPower"))
|
|
|
- .setElecMoney((int) Math.round(data.getDouble("TotalElecMoney") * 100))
|
|
|
- .setServiceMoney((int) Math.round(data.getDoubleValue("TotalSeviceMoney") * 100)) // 这里文档service单词错误,按文档填写
|
|
|
- .setTotalMoney((int) Math.round(data.getDoubleValue("TotalMoney") * 100))
|
|
|
- .setStopReason(data.getIntValue("StopReason"))
|
|
|
- .setSumPeriod(data.getIntValue("SumPeriod"))
|
|
|
- .setChargeDetail(data.getString("ChargeDetails"))
|
|
|
+ chargeOrder.setStartTime(LocalDateTime.parse(data.getString("StartTime"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))).setEndTime(LocalDateTime.parse(data.getString("EndTime"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))).setTotalPower(data.getDoubleValue("TotalPower")).setElecMoney((int) Math.round(data.getDouble("TotalElecMoney") * 100)).setServiceMoney((int) Math.round(data.getDoubleValue("TotalSeviceMoney") * 100)) // 这里文档service单词错误,按文档填写
|
|
|
+ .setTotalMoney((int) Math.round(data.getDoubleValue("TotalMoney") * 100)).setStopReason(data.getIntValue("StopReason")).setSumPeriod(data.getIntValue("SumPeriod")).setChargeDetail(data.getString("ChargeDetails"))
|
|
|
// 实付金额初始化为订单总金额
|
|
|
.setPayAmount(chargeOrder.getTotalMoney());
|
|
|
|
|
|
@@ -306,13 +326,15 @@ public class EnNotifyServiceImpl implements EnNotifyService {
|
|
|
userStationService.updateUserStation(chargeOrder);
|
|
|
}
|
|
|
|
|
|
- return """
|
|
|
+ var params = """
|
|
|
{
|
|
|
"StartChargeSeq":"%s",
|
|
|
"ConnectorID":"%s",
|
|
|
"ConfirmResult":%d
|
|
|
}
|
|
|
""".formatted(startChargeSeq, chargeOrder.getConnectorId(), 0);
|
|
|
+ var platform = PlatformCache.INSTANCE.getPlatformByName(platformName);
|
|
|
+ return PlatformAesUtil.encrypt(platform.getUserDataSecret(), platform.getUserDataSecretIv(), params);
|
|
|
}
|
|
|
|
|
|
|