From 569b78bca6a965eadb99107d9ad3edf03ed619a9 Mon Sep 17 00:00:00 2001 From: Lemon Date: Mon, 13 Jan 2025 09:15:43 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=96=B0=E8=BF=90=E5=B9=B3=E5=8F=B0Se?= =?UTF-8?q?rvice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ler.java => XinYunPlatformController.java} | 12 +++++------ .../thirdparty/ThirdPlatformTypeEnum.java | 2 +- ...pl.java => XinYunPlatformServiceImpl.java} | 20 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) rename jsowell-admin/src/main/java/com/jsowell/api/thirdparty/{XinYunWeiPlatformController.java => XinYunPlatformController.java} (96%) rename jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/{XinYunWeiPlatformServiceImpl.java => XinYunPlatformServiceImpl.java} (98%) diff --git a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/XinYunWeiPlatformController.java b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/XinYunPlatformController.java similarity index 96% rename from jsowell-admin/src/main/java/com/jsowell/api/thirdparty/XinYunWeiPlatformController.java rename to jsowell-admin/src/main/java/com/jsowell/api/thirdparty/XinYunPlatformController.java index 2404fd43e..03444eba5 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/XinYunWeiPlatformController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/XinYunPlatformController.java @@ -20,21 +20,21 @@ import javax.servlet.http.HttpServletRequest; import java.util.Map; /** - * 新运微平台Controller + * 新运平台Controller * * @author Lemon * @Date 2025/1/11 15:55:34 */ @Anonymous @RestController -@RequestMapping("/xinyunwei") -public class XinYunWeiPlatformController extends ThirdPartyBaseController{ - private final String platformName = "新运微平台"; +@RequestMapping("/xinyun") +public class XinYunPlatformController extends ThirdPartyBaseController{ + private final String platformName = "新运平台"; - private final String platformType = ThirdPlatformTypeEnum.XIN_YUN_WEI_PLATFORM.getTypeCode(); + private final String platformType = ThirdPlatformTypeEnum.XIN_YUN_PLATFORM.getTypeCode(); @Autowired - @Qualifier("xinYunWeiPlatformServiceImpl") + @Qualifier("xinYunPlatformServiceImpl") private ThirdPartyPlatformService platformLogic; /** diff --git a/jsowell-common/src/main/java/com/jsowell/common/enums/thirdparty/ThirdPlatformTypeEnum.java b/jsowell-common/src/main/java/com/jsowell/common/enums/thirdparty/ThirdPlatformTypeEnum.java index 0c0701a67..64fced732 100644 --- a/jsowell-common/src/main/java/com/jsowell/common/enums/thirdparty/ThirdPlatformTypeEnum.java +++ b/jsowell-common/src/main/java/com/jsowell/common/enums/thirdparty/ThirdPlatformTypeEnum.java @@ -30,7 +30,7 @@ public enum ThirdPlatformTypeEnum { NAN_RUI_PLATFORM("19", "南瑞平台", ""), GUANG_XI_PLATFORM("20", "广西平台", "450000000"), - XIN_YUN_WEI_PLATFORM("21", "新运微平台", ""), + XIN_YUN_PLATFORM("21", "新运平台", "MADKXL8FX"), ; private String typeCode; diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/XinYunWeiPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/XinYunPlatformServiceImpl.java similarity index 98% rename from jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/XinYunWeiPlatformServiceImpl.java rename to jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/XinYunPlatformServiceImpl.java index 40b7e8758..87ca6217e 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/XinYunWeiPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/XinYunPlatformServiceImpl.java @@ -60,7 +60,7 @@ import java.util.stream.Collectors; * @Date 2025/1/10 8:28:43 */ @Service -public class XinYunWeiPlatformServiceImpl implements ThirdPartyPlatformService { +public class XinYunPlatformServiceImpl implements ThirdPartyPlatformService { @Autowired private PileStationInfoService pileStationInfoService; @@ -80,7 +80,7 @@ public class XinYunWeiPlatformServiceImpl implements ThirdPartyPlatformService { private RedisCache redisCache; // 平台类型 - private final String thirdPlatformType = ThirdPlatformTypeEnum.XIN_YUN_WEI_PLATFORM.getTypeCode(); + private final String thirdPlatformType = ThirdPlatformTypeEnum.XIN_YUN_PLATFORM.getTypeCode(); @Override public void afterPropertiesSet() throws Exception { @@ -104,7 +104,7 @@ public class XinYunWeiPlatformServiceImpl implements ThirdPartyPlatformService { // token缓存key值 String redisKey = operatorId + "_token:"; // 通过operatorId 查出 operatorSecret - ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunWeiPlatformSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunPlatformSecretInfo(); if (thirdPartySecretInfoVO == null) { failReason = 1; succStat = 1; @@ -164,7 +164,7 @@ public class XinYunWeiPlatformServiceImpl implements ThirdPartyPlatformService { return null; } // ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId()); - ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunWeiPlatformSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunPlatformSecretInfo(); PageInfo pageInfo = new PageInfo<>(stationInfos); List resultList = new ArrayList<>(); for (ThirdPartyStationInfoVO pileStationInfo : pageInfo.getList()) { @@ -231,7 +231,7 @@ public class XinYunWeiPlatformServiceImpl implements ThirdPartyPlatformService { List stationIds = dto.getStationIds(); List StationStatusInfos = new ArrayList<>(); List ConnectorStatusInfos = new ArrayList<>(); - ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunWeiPlatformSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunPlatformSecretInfo(); ConnectorStatusInfo connectorStatusInfo; for (String stationId : stationIds) { @@ -299,7 +299,7 @@ public class XinYunWeiPlatformServiceImpl implements ThirdPartyPlatformService { */ @Override public Map queryStationStats(QueryStationInfoDTO dto) { - ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunWeiPlatformSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunPlatformSecretInfo(); // 根据站点id 查出这段时间的充电量 List list = orderBasicInfoService.getAccumulativeInfoForLianLian(dto); if (CollectionUtils.isEmpty(list)) { @@ -390,7 +390,7 @@ public class XinYunWeiPlatformServiceImpl implements ThirdPartyPlatformService { if (orderInfo == null) { return null; } - ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunWeiPlatformSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunPlatformSecretInfo(); OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderInfo.getOrderCode()); // 通过订单号查询实时数据 List realTimeData = orderBasicInfoService.getChargingRealTimeData(orderInfo.getTransactionCode()); @@ -454,7 +454,7 @@ public class XinYunWeiPlatformServiceImpl implements ThirdPartyPlatformService { */ @Override public String notificationStationStatus(String stationId, String pileConnectorCode, String status, ThirdPartySecretInfoVO secretInfoVO) { - ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunWeiPlatformSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunPlatformSecretInfo(); String operatorId = Constants.OPERATORID_JIANG_SU; String operatorSecret = thirdPartySecretInfoVO.getTheirOperatorSecret(); String signSecret = thirdPartySecretInfoVO.getTheirSigSecret(); @@ -512,7 +512,7 @@ public class XinYunWeiPlatformServiceImpl implements ThirdPartyPlatformService { BigDecimal voltage = realTimeMonitorData.getOutputVoltage() == null ? BigDecimal.ZERO : new BigDecimal(realTimeMonitorData.getOutputVoltage()); String soc = realTimeMonitorData.getSOC() == null ? Constants.ZERO : realTimeMonitorData.getSOC(); // 查询相关配置信息 - ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunWeiPlatformSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getXinYunPlatformSecretInfo(); String operatorId = Constants.OPERATORID_JIANG_SU; String operatorSecret = thirdPartySecretInfoVO.getTheirOperatorSecret(); @@ -621,7 +621,7 @@ public class XinYunWeiPlatformServiceImpl implements ThirdPartyPlatformService { * * @return */ - private ThirdPartySecretInfoVO getXinYunWeiPlatformSecretInfo() { + private ThirdPartySecretInfoVO getXinYunPlatformSecretInfo() { // 通过第三方平台类型查询相关配置信息 ThirdPartySecretInfoVO thirdPartySecretInfoVO = thirdpartySecretInfoService.queryByThirdPlatformType(thirdPlatformType); if (thirdPartySecretInfoVO == null) {