Commit 3056ca80 authored by hezhen's avatar hezhen

aa

parent 1a3bc9ac
......@@ -266,7 +266,8 @@ public class CertificationService {
//正面进行解析
String front = imageParse(idInformation.getFrontUrl(), frontParameter);
String back = imageParse(idInformation.getBackUrl(), backParameter);
log.info("----解析front========="+front);
log.info("----解析back========="+back);
if (StringUtils.isBlank(front) || StringUtils.isBlank(back)) {
return ObjectRestResponse.createDefaultFail();
}
......@@ -319,14 +320,13 @@ public class CertificationService {
//3.认证
String result = certificate(authMap);
log.info("----认证结果result========="+result);
//认证返回的参数是否为空
if (!StringUtils.isBlank(result)) {
Map<String, Object> map = (Map<String, Object>) JSONObject.parse(result);
System.out.println(map.get(certifRet));
log.info("----certifRet========="+certifRet);
if (MapUtil.isNotEmpty(map) || certifResultCode.equals(map.get(certifRet))) {
......@@ -343,7 +343,7 @@ public class CertificationService {
//获得到期时间
String endDate = (String) backData.get(expirationDateName);
System.out.println(endDate);
log.info("----获得到期时间endDate========="+endDate);
if (StringUtils.isBlank(endDate)) {
return ObjectRestResponse.succ();
}
......@@ -363,6 +363,7 @@ public class CertificationService {
idInformation.setExpirationDate(expirationDate);
Boolean aBoolean = addIdInformation(idInformation);
log.info("----请求admin========="+aBoolean);
if (aBoolean) {
return ObjectRestResponse.succ();
}
......@@ -389,8 +390,7 @@ public class CertificationService {
//
try {
System.out.println(querys);
log.info("----querys========="+querys);
HttpResponse response = CertifHttpUtils.doGet(cHost, cPath, cMethod, headers, querys);
StatusLine statusLine = response.getStatusLine();
int statusCode = statusLine.getStatusCode();
......@@ -427,6 +427,7 @@ public class CertificationService {
Map<String, String> querys = new HashMap<String, String>();
Map<String, String> bodys = new HashMap<String, String>();
bodys.put(picName, imageUrl);
//默认正面front,背面请传back
......@@ -439,8 +440,7 @@ public class CertificationService {
StatusLine statusLine = response.getStatusLine();
int statusCode = statusLine.getStatusCode();
System.out.println(statusCode);
log.info("----statusCode========="+querys);
/**
* 状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误
*/
......@@ -463,8 +463,7 @@ public class CertificationService {
//认证通过保存到数据库当中
public Boolean addIdInformation(IdInformation idInformation) {
System.out.println(idInformation);
log.info("----idInformation========="+idInformation);
//保存认证信息
try {
......
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