update 江苏省平台接口

This commit is contained in:
Lemon
2023-10-20 17:20:31 +08:00
parent be44562253
commit 4c6277b36c
6 changed files with 65 additions and 49 deletions

View File

@@ -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;