记得上下班打卡 | git大法好,push需谨慎

Commit e189af13 authored by 张国柄's avatar 张国柄

实名认证API+TRY;

parent 4325d805
package com.liquidnet.commons.lang.util; package com.liquidnet.commons.lang.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap; import org.springframework.util.MultiValueMap;
public class IdentityUtils { public class IdentityUtils {
private static final Logger log = LoggerFactory.getLogger(IdentityUtils.class);
private static String aliThirdUrl = "https://1.api.apistore.cn/idcard3"; private static String aliThirdUrl = "https://1.api.apistore.cn/idcard3";
private static String aliThirdAppCode = "cc29fa8cb494468289dec09df46922b5"; private static String aliThirdAppCode = "cc29fa8cb494468289dec09df46922b5";
...@@ -13,6 +16,11 @@ public class IdentityUtils { ...@@ -13,6 +16,11 @@ public class IdentityUtils {
params.add("cardNo",cardNo); params.add("cardNo",cardNo);
MultiValueMap<String, String> header = new LinkedMultiValueMap<>(); MultiValueMap<String, String> header = new LinkedMultiValueMap<>();
header.add("Authorization","APPCODE "+aliThirdAppCode); header.add("Authorization","APPCODE "+aliThirdAppCode);
return HttpUtil.post(aliThirdUrl,params,header); try {
return HttpUtil.post(aliThirdUrl, params, header);
} catch (Exception e) {
log.error("###实名认证异常:{}", e.getLocalizedMessage(), e);
return null;
}
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment