mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-03 09:29:59 +08:00
update 江苏省平台接口
This commit is contained in:
@@ -44,6 +44,8 @@ import com.jsowell.thirdparty.lianlian.util.HttpRequestUtil;
|
||||
import com.jsowell.thirdparty.lianlian.vo.*;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -62,6 +64,8 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// private static final String DATA_SECRET = "R1Hdq80mSWswwCzt"; // 消息密钥 R1Hdq80mSWswwCzt 1234567890abcdef
|
||||
// private static final String DATA_SECRETIV = "LVpz3qHD8sM2PYjl"; // 消息密钥初始化向量 LVpz3qHD8sM2PYjl 1234567890abcdef
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private IPileMerchantInfoService pileMerchantInfoService;
|
||||
|
||||
@@ -779,6 +783,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
|
||||
String response = HttpUtil.post(requestUrl, tokenRequest);
|
||||
LianLianResultVO result = JSON.parseObject(response, LianLianResultVO.class);
|
||||
logger.info("获取令牌 result:{}", result);
|
||||
|
||||
if (result.getRet() == 0) {
|
||||
// 解密data
|
||||
@@ -787,6 +792,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
String dataStr = new String(plainText, "UTF-8");
|
||||
Map<String, String> resultMap = (Map<String, String>) JSON.parse(dataStr);
|
||||
token = resultMap.get("AccessToken");
|
||||
logger.info("token: {}", token);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return token;
|
||||
|
||||
Reference in New Issue
Block a user