mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update
This commit is contained in:
@@ -59,6 +59,17 @@ public class HaiNanChargeService extends AbsInterfaceWithPlatformLogic {
|
||||
* 6.2 查询充电站信息
|
||||
*/
|
||||
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
|
||||
// 查询出要查询的充电站id并set进 dto 的stationIds
|
||||
if (StringUtils.isNotBlank(dto.getThirdPlatformType())) {
|
||||
List<ThirdPartyStationRelation> xdtList = relationService.selectThirdPartyStationRelationList(dto.getThirdPlatformType());
|
||||
if (CollectionUtils.isNotEmpty(xdtList)) {
|
||||
List<String> stationList = xdtList.stream()
|
||||
.map(x -> String.valueOf(x.getStationId()))
|
||||
.collect(Collectors.toList());
|
||||
dto.setStationIds(stationList);
|
||||
}
|
||||
}
|
||||
|
||||
List<ZDLStationInfo> resultList = new ArrayList<>();
|
||||
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
|
||||
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
|
||||
|
||||
@@ -54,6 +54,9 @@ public abstract class AbsInterfaceWithPlatformLogic implements InitializingBean
|
||||
@Autowired
|
||||
protected PileConnectorInfoService pileConnectorInfoService;
|
||||
|
||||
@Autowired
|
||||
protected ThirdPartyStationRelationService relationService;
|
||||
|
||||
@Autowired
|
||||
protected PileModelInfoService pileModelInfoService;
|
||||
|
||||
@@ -154,7 +157,7 @@ public abstract class AbsInterfaceWithPlatformLogic implements InitializingBean
|
||||
/**
|
||||
* 身份认证
|
||||
*/
|
||||
protected Map<String, String> generateToken(CommonParamsDTO dto) {
|
||||
public Map<String, String> generateToken(CommonParamsDTO dto) {
|
||||
String operatorID = dto.getOperatorID();
|
||||
// 通过operatorID 查出 operatorSecret
|
||||
ThirdPartyPlatformConfig platformConfig = thirdPartyPlatformConfigService.getInfoByOperatorId(operatorID);
|
||||
@@ -188,7 +191,6 @@ public abstract class AbsInterfaceWithPlatformLogic implements InitializingBean
|
||||
// 生成token返回 eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI0MjUwMTA3NjUiLCJpYXQiOjE2ODUwOTcxMTYsInN1YiI6IjEyMzEyMzEyMzEyM2FhYWEiLCJleHAiOjY4NjkwOTcxMTZ9.NyxOUIZmgsqtfex7oiMRR2LaWePTA56WHVMXIkWWt2w
|
||||
long ttlMillis = 60 * 60 * 24 * 1000;
|
||||
String token = JWTUtils.createToken(operatorID, operatorSecret, ttlMillis);
|
||||
// System.out.println("生成的token:" + token);
|
||||
|
||||
// 组装返回参数
|
||||
AccessTokenVO vo = new AccessTokenVO();
|
||||
@@ -212,7 +214,7 @@ public abstract class AbsInterfaceWithPlatformLogic implements InitializingBean
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
protected Map<String, String> checkoutSign(CommonParamsDTO dto){
|
||||
public Map<String, String> checkoutSign(CommonParamsDTO dto){
|
||||
String operatorID = dto.getOperatorID();
|
||||
// 通过operatorID 查出 operatorSecret
|
||||
ThirdPartyPlatformConfig platformConfig = thirdPartyPlatformConfigService.getInfoByOperatorId(operatorID);
|
||||
@@ -317,7 +319,6 @@ public abstract class AbsInterfaceWithPlatformLogic implements InitializingBean
|
||||
|
||||
resultList.add(connectorInfo);
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user