|
|
@@ -60,10 +60,11 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthenticatio
|
|
60
|
60
|
public IdentityAuthentication selectIdentityAuthentication(IdentityAuthentication identityAuthentication) {
|
|
61
|
61
|
IdentityAuthentication identityAuthenticationselect = identityAuthenticationMapper.selectIdentityAuthentication(identityAuthentication);
|
|
62
|
62
|
if(identityAuthenticationselect!=null){
|
|
63
|
|
- identityAuthenticationselect.setCertificationStatusName("已身份注册");
|
|
|
63
|
+ identityAuthenticationselect.setCertificationStatusName("已身份认证");
|
|
64
|
64
|
}else {
|
|
65
|
65
|
IdentityAuthentication identityAuthenticationselectnew = new IdentityAuthentication();
|
|
66
|
|
- identityAuthenticationselectnew.setCertificationStatusName("未身份注册");
|
|
|
66
|
+ identityAuthenticationselectnew.setCertificationStatusName("未身份认证");
|
|
|
67
|
+ identityAuthenticationselectnew.setCertificationStatus(0);
|
|
67
|
68
|
return identityAuthenticationselectnew;
|
|
68
|
69
|
}
|
|
69
|
70
|
return identityAuthenticationselect;
|
|
|
@@ -119,15 +120,15 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthenticatio
|
|
119
|
120
|
GetEidResultRequest reqest = new GetEidResultRequest();
|
|
120
|
121
|
//设置请求参数
|
|
121
|
122
|
reqest.setEidToken(eidToken);
|
|
|
123
|
+
|
|
|
124
|
+// reqest.setInfoType("1");
|
|
|
125
|
+// reqest.setInfoType("13");
|
|
|
126
|
+ reqest.setInfoType("2");
|
|
|
127
|
+
|
|
122
|
128
|
//获得身份认证结果
|
|
123
|
129
|
GetEidResultResponse respIdenAuth = clientIdenAuth.GetEidResult(reqest);
|
|
124
|
130
|
String respJSON = GetEidResultResponse.toJsonString(respIdenAuth);
|
|
125
|
131
|
JSONObject objJSON = JSON.parseObject(respJSON);
|
|
126
|
|
- JSONObject objText = JSON.parseObject(objJSON.getString("Text"));
|
|
127
|
|
- String name = objText.getString("OcrName");
|
|
128
|
|
-// IdentityAuthenticationRespon.setName(name);
|
|
129
|
|
- String identityNo = objText.getString("OcrIdCard");
|
|
130
|
|
-// IdentityAuthenticationRespon.setIdentityNo(identityNo);
|
|
131
|
132
|
IdentityAuthenticationRespon.setCertificationStatus(1);
|
|
132
|
133
|
IdentityAuthenticationRespon.setUserName(userName);
|
|
133
|
134
|
IdentityAuthenticationRespon.setUserId(userId);
|
|
|
@@ -138,14 +139,11 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthenticatio
|
|
138
|
139
|
Map<String,String> mapEidInfo = decodeEidInfo(desKey,uerInfo);
|
|
139
|
140
|
IdentityAuthenticationRespon.setName(mapEidInfo.get("name"));
|
|
140
|
141
|
IdentityAuthenticationRespon.setIdentityNo(mapEidInfo.get("identityNo"));
|
|
|
142
|
+ IdentityAuthenticationRespon.setCertificationStatus(1);
|
|
141
|
143
|
|
|
142
|
144
|
identityAuthenticationMapper.insertIdentityAuthentication(IdentityAuthenticationRespon);
|
|
143
|
|
-// IdentityAuthenticationResult.setUserName(userName);
|
|
144
|
145
|
IdentityAuthenticationResult.setCertificationStatus(1);
|
|
145
|
146
|
IdentityAuthenticationResult.setCertificationStatusName("认证成功");
|
|
146
|
|
-// IdentityAuthenticationResult.setName(name);
|
|
147
|
|
-// IdentityAuthenticationResult.setIdentityNo(identityNo);
|
|
148
|
|
- System.out.println(GetEidResultResponse.toJsonString(respIdenAuth));
|
|
149
|
147
|
} catch (TencentCloudSDKException e) {
|
|
150
|
148
|
log.error("认证失败:", e);
|
|
151
|
149
|
throw new RuntimeException("认证失败");
|