|
@@ -254,7 +254,7 @@ public class EsignController extends ApiBaseController {
|
|
|
|
|
|
@ApiOperation(value = "E签宝个人注册返回认证接口",
|
|
@ApiOperation(value = "E签宝个人注册返回认证接口",
|
|
notes = "参数:{" +
|
|
notes = "参数:{" +
|
|
- "userId:'123'}" +
|
|
|
|
|
|
+ "userId:'123','userName':'真实姓名','idNumber':'身份证号'}" +
|
|
"错误:" +
|
|
"错误:" +
|
|
"301 用户已经注册且认证" +
|
|
"301 用户已经注册且认证" +
|
|
"500 注册失败" +
|
|
"500 注册失败" +
|
|
@@ -267,20 +267,29 @@ public class EsignController extends ApiBaseController {
|
|
public Object createPersonalAccount(){
|
|
public Object createPersonalAccount(){
|
|
ParameterObject obj = getParameterObject();
|
|
ParameterObject obj = getParameterObject();
|
|
//判断参数
|
|
//判断参数
|
|
- obj.checkParameterNotNull("userId");
|
|
|
|
|
|
+ obj.checkParameterNotNull("userId,userName,idNumber");
|
|
String userId = obj.getString("userId");
|
|
String userId = obj.getString("userId");
|
|
-// SysUser user = obj.parseBean(SysUser.class);
|
|
|
|
|
|
+ String userName = obj.getString("userName");
|
|
|
|
+ String idNumber = obj.getString("idNumber");
|
|
//根据用户loginName查询用户信息
|
|
//根据用户loginName查询用户信息
|
|
SysUser user = userService.selectUserById(Long.parseLong(userId));
|
|
SysUser user = userService.selectUserById(Long.parseLong(userId));
|
|
|
|
+ user.setUserName(userName);
|
|
|
|
+ user.setIdNumber(idNumber);
|
|
//判断是否注册
|
|
//判断是否注册
|
|
if (user.getAccountId()!=null&&user.getAccountId()!=""){//已经注册
|
|
if (user.getAccountId()!=null&&user.getAccountId()!=""){//已经注册
|
|
//判断是否认证
|
|
//判断是否认证
|
|
if ("1".equals(user.getIsAuthentication())){//已经认证
|
|
if ("1".equals(user.getIsAuthentication())){//已经认证
|
|
return AjaxResult.error(301,"用户已经注册且认证");
|
|
return AjaxResult.error(301,"用户已经注册且认证");
|
|
}else {//没有认证
|
|
}else {//没有认证
|
|
- //获取认证路径
|
|
|
|
- String url = personRealnVerifyService.personRealnVerify(user.getAccountId());
|
|
|
|
- return AjaxResult.success("url",url);
|
|
|
|
|
|
+ /*调用E签宝修改用户认证信息*/
|
|
|
|
+ int result = eSignService.updatePersonalAccount(user);
|
|
|
|
+ if (result > 0){
|
|
|
|
+ //获取认证路径
|
|
|
|
+ String url = personRealnVerifyService.personRealnVerify(user.getAccountId());
|
|
|
|
+ return AjaxResult.success("url",url);
|
|
|
|
+ }else{
|
|
|
|
+ return AjaxResult.error("认证失败");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}else {//没有注册
|
|
}else {//没有注册
|
|
//去注册
|
|
//去注册
|
|
@@ -304,7 +313,7 @@ public class EsignController extends ApiBaseController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "E签宝企业注册返回认证接口",
|
|
@ApiOperation(value = "E签宝企业注册返回认证接口",
|
|
notes = "参数:{" +
|
|
notes = "参数:{" +
|
|
- "userId:'123',customersName:'XXX商贸公司',orgLegalIdNumber:'企业法定代表人证件号','orgLegalName':'企业法定代表人名称'}" +
|
|
|
|
|
|
+ "userId:'123',customersName:'机构名称(XXX商贸公司)',orgLegalIdNumber:'企业法定代表人证件号','orgLegalName':'企业法定代表人名称'}" +
|
|
"错误:" +
|
|
"错误:" +
|
|
"301 企业已经注册且认证" +
|
|
"301 企业已经注册且认证" +
|
|
"201 个人未注册" +
|
|
"201 个人未注册" +
|
|
@@ -343,9 +352,15 @@ public class EsignController extends ApiBaseController {
|
|
if ("1".equals(customersExt.getIsAuthentication())){//已认证
|
|
if ("1".equals(customersExt.getIsAuthentication())){//已认证
|
|
return AjaxResult.error(301,"企业已经注册且认证");
|
|
return AjaxResult.error(301,"企业已经注册且认证");
|
|
}else {//未认证
|
|
}else {//未认证
|
|
- //获取认证路径
|
|
|
|
- String url = organRealVerifyService.organRealVerify(customersExt.getOrgId(),customersExt.getCreator());
|
|
|
|
- return AjaxResult.success("url",url);
|
|
|
|
|
|
+ /*修改企业注册信息*/
|
|
|
|
+ int result = eSignService.updateThirdParty(customersExt);
|
|
|
|
+ if (result>0){
|
|
|
|
+ //获取认证路径
|
|
|
|
+ String url = organRealVerifyService.organRealVerify(customersExt.getOrgId(),customersExt.getCreator());
|
|
|
|
+ return AjaxResult.success("url",url);
|
|
|
|
+ }else{
|
|
|
|
+ return AjaxResult.error("认证失败");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}else {//未注册
|
|
}else {//未注册
|
|
//去注册
|
|
//去注册
|