mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 03:55:17 +08:00
update 对接lianlian平台
This commit is contained in:
@@ -40,10 +40,7 @@ import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
|
||||
import com.jsowell.thirdparty.platform.common.ChargeDetail;
|
||||
import com.jsowell.thirdparty.platform.common.OrderInfo;
|
||||
import com.jsowell.thirdparty.platform.common.StationInfo;
|
||||
import com.jsowell.thirdparty.platform.util.Cryptos;
|
||||
import com.jsowell.thirdparty.platform.util.Encodes;
|
||||
import com.jsowell.thirdparty.platform.util.GBSignUtils;
|
||||
import com.jsowell.thirdparty.platform.util.HttpRequestUtil;
|
||||
import com.jsowell.thirdparty.platform.util.*;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -916,7 +913,7 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
EquipmentAuthVO vo = new EquipmentAuthVO();
|
||||
|
||||
String equipAuthSeq = dto.getEquipAuthSeq(); // MA1X78KH5202311071202015732
|
||||
String pileConnectorCode = dto.getConnectorID();
|
||||
String pileConnectorCode = ThirdPartyPlatformUtils.extractConnectorID(dto.getConnectorID());
|
||||
// 先查询配置密钥相关信息
|
||||
ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorID());
|
||||
if (configInfo == null) {
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.google.common.collect.Maps;
|
||||
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class ThirdPartyPlatformUtils {
|
||||
|
||||
@@ -37,5 +39,20 @@ public class ThirdPartyPlatformUtils {
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从给定的URL字符串中提取充电桩枪口号。
|
||||
*
|
||||
* @param url URL字符串
|
||||
* @return 提取的枪口号,如果没有找到则返回null
|
||||
*/
|
||||
public static String extractConnectorID(String url) {
|
||||
String regex = "/app-xcx-h5/pile/connectorDetail/(\\d+)";
|
||||
Pattern pattern = Pattern.compile(regex);
|
||||
Matcher matcher = pattern.matcher(url);
|
||||
if (matcher.find()) {
|
||||
return matcher.group(1); // 返回正则表达式括号内匹配的数字
|
||||
}
|
||||
return null; // 没有找到匹配项
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user