mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-03 13:38:02 +08:00
update
This commit is contained in:
@@ -160,20 +160,20 @@ public class SpringBootTestController {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testLianLian(){
|
public void testLianLian(){
|
||||||
// // 获取令牌
|
// 获取令牌
|
||||||
// LianLianGetTokenDTO dto = new LianLianGetTokenDTO();
|
// LianLianGetTokenDTO dto = new LianLianGetTokenDTO();
|
||||||
// dto.setOperatorId("987654321");
|
// dto.setOperatorId("MA1JLFUU8");
|
||||||
// dto.setOperatorSecret("1234567890abcdef");
|
// dto.setOperatorSecret("Nh62XxlIR5OjAzFj");
|
||||||
// String token = lianLianService.getToken(dto);
|
String token = lianLianService.getToken("MA1JLFUU8", "fGwLsxW1HdzLw7jp");
|
||||||
// System.out.println("token:" + token);
|
System.out.println("token:" + token);
|
||||||
//
|
|
||||||
//
|
|
||||||
// LianLianPushStationInfoDTO dto1 = LianLianPushStationInfoDTO.builder()
|
// LianLianPushStationInfoDTO dto1 = LianLianPushStationInfoDTO.builder()
|
||||||
// .OperatorID("987654321")
|
// .OperatorID("MA1JLFUU8")
|
||||||
// .DataSecret("1234567890abcdef")
|
// .DataSecret("HVicnbRZbhPdIdpF")
|
||||||
// .DataSecretIV("1234567890abcdef")
|
// .DataSecretIV("JNvcjSOn1vhrE11M")
|
||||||
// .SigSecret("1234567890abcdef")
|
// .SigSecret("53TtFpc4gdVZbF3x")
|
||||||
// .token(token)
|
// // .token(token)
|
||||||
// .stationId(2L)
|
// .stationId(2L)
|
||||||
//
|
//
|
||||||
// .build();
|
// .build();
|
||||||
@@ -204,7 +204,7 @@ public class SpringBootTestController {
|
|||||||
// lianLianService.queryOrderSettlementInfo("C27680791529");
|
// lianLianService.queryOrderSettlementInfo("C27680791529");
|
||||||
|
|
||||||
// 推送订单对账结果信息
|
// 推送订单对账结果信息
|
||||||
lianLianService.pushOrderReconciliationInfo("C27680791529");
|
// lianLianService.pushOrderReconciliationInfo("C27680791529");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,12 +41,12 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class LianLianServiceImpl implements LianLianService {
|
public class LianLianServiceImpl implements LianLianService {
|
||||||
private static final String TEST_URL = "http://testdataexchange.evchargeonline.com:82/shevcs/v1/";
|
private static final String TEST_URL = "http://dataexchange.evchargeonline.com:81/shevcs/v1/"; // http://testdataexchange.evchargeonline.com:82/shevcs/v1/
|
||||||
private static final String OPERATOR_ID = "987654321";
|
private static final String OPERATOR_ID = "MA1JLFUU8"; // MA1JLFUU8 987654321
|
||||||
private static final String OPERATOR_SECRET = "1234567890abcdef";
|
private static final String OPERATOR_SECRET = "fGwLsxW1HdzLw7jp"; // fGwLsxW1HdzLw7jp 1234567890abcdef
|
||||||
private static final String SIG_SECRET = "1234567890abcdef"; // 签名秘钥
|
private static final String SIG_SECRET = "TmsdVaFVTtjzZbLi"; // 签名秘钥 TmsdVaFVTtjzZbLi 1234567890abcdef
|
||||||
private static final String DATA_SECRET = "1234567890abcdef"; // 消息密钥
|
private static final String DATA_SECRET = "R1Hdq80mSWswwCzt"; // 消息密钥 R1Hdq80mSWswwCzt 1234567890abcdef
|
||||||
private static final String DATA_SECRETIV = "1234567890abcdef"; // 消息密钥初始化向量
|
private static final String DATA_SECRETIV = "LVpz3qHD8sM2PYjl"; // 消息密钥初始化向量 LVpz3qHD8sM2PYjl 1234567890abcdef
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPileMerchantInfoService pileMerchantInfoService;
|
private IPileMerchantInfoService pileMerchantInfoService;
|
||||||
@@ -156,7 +156,9 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
String jsonString = JSONObject.toJSONString(data);
|
String jsonString = JSONObject.toJSONString(data);
|
||||||
System.out.println("jsonString : " + jsonString);
|
System.out.println("jsonString : " + jsonString);
|
||||||
|
|
||||||
String result = HttpRequestUtil.sendPost(dto.getToken(), jsonString, url, dto.getDataSecret()
|
// 获取令牌
|
||||||
|
String token = getToken(dto.getOperatorID(), OPERATOR_SECRET);
|
||||||
|
String result = HttpRequestUtil.sendPost(token, jsonString, url, dto.getDataSecret()
|
||||||
, dto.getDataSecretIV(), dto.getOperatorID(), dto.getSigSecret());
|
, dto.getDataSecretIV(), dto.getOperatorID(), dto.getSigSecret());
|
||||||
|
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@@ -596,7 +598,7 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
Map<String, String> request = new LinkedHashMap<>();
|
Map<String, String> request = new LinkedHashMap<>();
|
||||||
request.put("OperatorID", operatorId);
|
request.put("OperatorID", operatorId);
|
||||||
request.put("Data", strData);
|
request.put("Data", strData);
|
||||||
request.put("TimeStamp", System.currentTimeMillis() + "");
|
request.put("TimeStamp", DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSS, new Date()));
|
||||||
request.put("Seq", "0001");
|
request.put("Seq", "0001");
|
||||||
|
|
||||||
//生成签名
|
//生成签名
|
||||||
|
|||||||
Reference in New Issue
Block a user