|
|
@@ -197,19 +197,24 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
|
197
|
197
|
*/
|
|
198
|
198
|
// authentication.setUserName(loginUser.getUsername());
|
|
199
|
199
|
// authentication.setUserId(loginUser.getUserId());
|
|
200
|
|
- authentication.setName(name);
|
|
|
200
|
+
|
|
201
|
201
|
authentication.setIdentityNo(idcardno);
|
|
202
|
|
- authentication.setCertificationTime(new Date());
|
|
203
|
|
- authentication.setCertificationStatus(0);
|
|
204
|
|
- authentication.setCreateBy(name);
|
|
205
|
|
- // authentication.setCreateBy(loginUser.getUsername());
|
|
206
|
|
- try {
|
|
207
|
|
- identityAuthenticationMapper.insertIdentityAuthentication(authentication);
|
|
208
|
|
- authentication.setId(authentication.getId());
|
|
209
|
|
- } catch (Exception e) {
|
|
210
|
|
- System.out.println("认证记录新增失败");
|
|
|
202
|
+ // 查询认证表是否已存在该身份证信息的认证,不存在则新增,存在不处理
|
|
|
203
|
+ IdentityAuthentication identityAuthentication = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
|
|
|
204
|
+ if(identityAuthentication!=null) {
|
|
|
205
|
+ return AjaxResult.success(identityAuthentication);
|
|
211
|
206
|
}
|
|
212
|
|
-
|
|
|
207
|
+ authentication.setName(name);
|
|
|
208
|
+ authentication.setCertificationTime(new Date());
|
|
|
209
|
+ authentication.setCertificationStatus(0);
|
|
|
210
|
+ authentication.setCreateBy(name);
|
|
|
211
|
+ // authentication.setCreateBy(loginUser.getUsername());
|
|
|
212
|
+ try {
|
|
|
213
|
+ identityAuthenticationMapper.insertIdentityAuthentication(authentication);
|
|
|
214
|
+ authentication.setId(authentication.getId());
|
|
|
215
|
+ } catch (Exception e) {
|
|
|
216
|
+ System.out.println("认证记录新增失败");
|
|
|
217
|
+ }
|
|
213
|
218
|
}
|
|
214
|
219
|
|
|
215
|
220
|
}
|