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:
@@ -53,7 +53,7 @@ public interface LianLianService {
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
EquipmentAuthVO query_equip_auth(QueryEquipmentDTO dto);
|
||||
Map<String, String> query_equip_auth(QueryEquipmentDTO dto);
|
||||
|
||||
/**
|
||||
* 请求开始充电
|
||||
|
||||
@@ -492,7 +492,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EquipmentAuthVO query_equip_auth(QueryEquipmentDTO dto) {
|
||||
public Map<String, String> query_equip_auth(QueryEquipmentDTO dto) {
|
||||
EquipmentAuthVO vo = new EquipmentAuthVO();
|
||||
|
||||
String equipAuthSeq = dto.getEquipAuthSeq();
|
||||
@@ -506,7 +506,11 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
if (pileBasicInfo == null) {
|
||||
vo.setFailReason(2); // 设备检测失败
|
||||
vo.setFailReasonMsg("未查到该桩的数据");
|
||||
throw new BusinessException("", "");
|
||||
return null;
|
||||
}
|
||||
DockingPlatformConfig configInfo = dockingPlatformConfigService.getInfoByOperatorId(dto.getOperatorID());
|
||||
if (configInfo == null) {
|
||||
return null;
|
||||
}
|
||||
if (pileBasicInfo.getMerchantId() == Long.parseLong(merchantId)) {
|
||||
vo.setSuccStat(0);
|
||||
@@ -526,7 +530,19 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
vo.setEquipAuthSeq(equipAuthSeq);
|
||||
vo.setConnectorID(pileConnectorCode);
|
||||
|
||||
return vo;
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
configInfo.getOperatorSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
resultMap.put("Data", encryptData);
|
||||
// 生成sig
|
||||
String resultSign = GBSignUtils.sign(resultMap, configInfo.getOperatorSecret());
|
||||
resultMap.put("Sig", resultSign);
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.jsowell.thirdparty.lianlian.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 联联平台分页反参
|
||||
*
|
||||
* @author JS-ZZA
|
||||
* @date 2023/4/10 15:24
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class LianLianPageResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8425633122529553009L;
|
||||
/**
|
||||
* 当前页数
|
||||
*/
|
||||
private int PageNo;
|
||||
|
||||
/**
|
||||
* 页码总数
|
||||
*/
|
||||
private int PageCount;
|
||||
|
||||
/**
|
||||
* 总记录条数
|
||||
*/
|
||||
private int ItemSize;
|
||||
|
||||
/**
|
||||
* 数据集合
|
||||
*/
|
||||
private List<?> list;
|
||||
}
|
||||
Reference in New Issue
Block a user