mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
update
This commit is contained in:
@@ -41,12 +41,12 @@ import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class LianLianServiceImpl implements LianLianService {
|
||||
private static final String TEST_URL = "http://testdataexchange.evchargeonline.com:82/shevcs/v1/";
|
||||
private static final String OPERATOR_ID = "987654321";
|
||||
private static final String OPERATOR_SECRET = "1234567890abcdef";
|
||||
private static final String SIG_SECRET = "1234567890abcdef"; // 签名秘钥
|
||||
private static final String DATA_SECRET = "1234567890abcdef"; // 消息密钥
|
||||
private static final String DATA_SECRETIV = "1234567890abcdef"; // 消息密钥初始化向量
|
||||
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 = "MA1JLFUU8"; // MA1JLFUU8 987654321
|
||||
private static final String OPERATOR_SECRET = "fGwLsxW1HdzLw7jp"; // fGwLsxW1HdzLw7jp 1234567890abcdef
|
||||
private static final String SIG_SECRET = "TmsdVaFVTtjzZbLi"; // 签名秘钥 TmsdVaFVTtjzZbLi 1234567890abcdef
|
||||
private static final String DATA_SECRET = "R1Hdq80mSWswwCzt"; // 消息密钥 R1Hdq80mSWswwCzt 1234567890abcdef
|
||||
private static final String DATA_SECRETIV = "LVpz3qHD8sM2PYjl"; // 消息密钥初始化向量 LVpz3qHD8sM2PYjl 1234567890abcdef
|
||||
|
||||
@Autowired
|
||||
private IPileMerchantInfoService pileMerchantInfoService;
|
||||
@@ -156,7 +156,9 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
String jsonString = JSONObject.toJSONString(data);
|
||||
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());
|
||||
|
||||
System.out.println(result);
|
||||
@@ -596,7 +598,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
Map<String, String> request = new LinkedHashMap<>();
|
||||
request.put("OperatorID", operatorId);
|
||||
request.put("Data", strData);
|
||||
request.put("TimeStamp", System.currentTimeMillis() + "");
|
||||
request.put("TimeStamp", DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSS, new Date()));
|
||||
request.put("Seq", "0001");
|
||||
|
||||
//生成签名
|
||||
|
||||
Reference in New Issue
Block a user