|
@@ -195,24 +195,27 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
|
String accountId = "";
|
|
|
String sealData = "";
|
|
|
|
|
|
- try {
|
|
|
+ SysUser user = sysUserFeignService.queryUserById(userId);
|
|
|
+ if (user == null) {
|
|
|
+ throw new BizException("用户信息查询失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ if(CertificateTypeEnum.IDENTITY.getCode().equals(user.getCertificateType())){
|
|
|
if(!debugMode){
|
|
|
realnameAuthenticationPluginContext.getRealnameAuthenticationPlugin(LinkfaceRealnameAuthenticationPlugin.getName()).verify(realName, idCardNo);
|
|
|
}
|
|
|
|
|
|
accountId = eSealPlugin.createUserAccount(realName, idCardNo, mobileNo);
|
|
|
|
|
|
-// if (StringUtils.isBlank(accountId)) {
|
|
|
-// throw new BizException("创建电子存证账户失败");
|
|
|
-// }
|
|
|
+ if (StringUtils.isBlank(accountId)) {
|
|
|
+ throw new BizException("创建电子存证账户失败");
|
|
|
+ }
|
|
|
|
|
|
sealData = eSealPlugin.createUserSeal(accountId);
|
|
|
|
|
|
-// if (StringUtils.isBlank(sealData)) {
|
|
|
-// throw new BizException("创建电子存证印章失败");
|
|
|
-// }
|
|
|
- } catch (BizException e) {
|
|
|
- logger.error("用户身份信息验证失败", e);
|
|
|
+ if (StringUtils.isBlank(sealData)) {
|
|
|
+ throw new BizException("创建电子存证印章失败");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
sysUserTsign = new SysUserTsign(userId, accountId, sealData, realName, idCardNo);
|