|
@@ -152,20 +152,22 @@ public class EsignController extends ApiBaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value = "E签宝个人认证", notes = "参数:{'userId':'XXXXXXX'}" +
|
|
|
- "\n(userId:待认证用户id)")
|
|
|
+ @ApiOperation(value = "E签宝个人认证", notes = "参数:{'userId':'XXXXXXX','redirectUrl':'xxxx'}" +
|
|
|
+ "\n(userId:待认证用户id" +
|
|
|
+ "\n redirectUrl:认证结束后页面跳转地址url)")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "params", paramType = "body")
|
|
|
})
|
|
|
@PostMapping("personRealnVerify")
|
|
|
public Object personRealnVerify() {
|
|
|
ParameterObject obj = getParameterObject();
|
|
|
- obj.checkParameterNotNull("userId");
|
|
|
+ obj.checkParameterNotNull("userId,redirectUrl");
|
|
|
String userId = obj.getString("userId");
|
|
|
+ String redirectUrl = obj.getString("redirectUrl");
|
|
|
SysUser sysUser = userService.selectUserById(Long.parseLong(userId));
|
|
|
String result="";
|
|
|
if (sysUser!=null){
|
|
|
- result = personRealnVerifyService.personRealnVerify(sysUser.getAccountId());
|
|
|
+ result = personRealnVerifyService.personRealnVerify(sysUser.getAccountId(),redirectUrl);
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
@@ -198,22 +200,24 @@ public class EsignController extends ApiBaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value = "E签宝企业认证", notes = "参数:{'userId':'XXXXXXX'}" +
|
|
|
- "\n(userId:待认证e签宝用户id)")
|
|
|
+ @ApiOperation(value = "E签宝企业认证", notes = "参数:{'userId':'XXXXXXX','redirectUrl':'xxxxx'}" +
|
|
|
+ "\n(userId:待认证e签宝用户id" +
|
|
|
+ "\n redirectUrl:企业认证成功跳转URl)")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "params", paramType = "body")
|
|
|
})
|
|
|
@PostMapping("organRealVerify")
|
|
|
public Object organRealVerify() {
|
|
|
ParameterObject obj = getParameterObject();
|
|
|
- obj.checkParameterNotNull("userId");
|
|
|
+ obj.checkParameterNotNull("userId,redirectUrl");
|
|
|
String userId = obj.getString("userId");
|
|
|
+ String redirectUrl = obj.getString("redirectUrl");
|
|
|
SysUser sysUser = userService.selectUserById(Long.parseLong(userId));
|
|
|
String result="";
|
|
|
if (sysUser!=null){
|
|
|
CustomersExt customersExt = customersExtService.selectCustomersExtById(sysUser.getSysUserExt().getOrgCode());
|
|
|
if (customersExt!=null){
|
|
|
- result = organRealVerifyService.organRealVerify(sysUser.getAccountId(), customersExt.getOrgId());
|
|
|
+ result = organRealVerifyService.organRealVerify(sysUser.getAccountId(), customersExt.getOrgId(),redirectUrl);
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
@@ -257,7 +261,7 @@ public class EsignController extends ApiBaseController {
|
|
|
|
|
|
@ApiOperation(value = "E签宝个人注册返回认证接口",
|
|
|
notes = "参数:{" +
|
|
|
- "userId:'123','userName':'真实姓名','idNumber':'身份证号'}" +
|
|
|
+ "userId:'123','userName':'真实姓名','redirectUrl':'跳转url(http://baidu.com)'}" +
|
|
|
"错误:" +
|
|
|
"301 用户已经注册且认证" +
|
|
|
"500 注册失败" +
|
|
@@ -270,14 +274,13 @@ public class EsignController extends ApiBaseController {
|
|
|
public Object createPersonalAccount(){
|
|
|
ParameterObject obj = getParameterObject();
|
|
|
//判断参数
|
|
|
- obj.checkParameterNotNull("userId,userName,idNumber");
|
|
|
+ obj.checkParameterNotNull("userId,userName,idNumber,redirectUrl");
|
|
|
String userId = obj.getString("userId");
|
|
|
String userName = obj.getString("userName");
|
|
|
- String idNumber = obj.getString("idNumber");
|
|
|
+ String redirectUrl = obj.getString("redirectUrl");
|
|
|
//根据用户loginName查询用户信息
|
|
|
SysUser user = userService.selectUserById(Long.parseLong(userId));
|
|
|
user.setUserName(userName);
|
|
|
- user.setIdNumber(idNumber);
|
|
|
//判断是否注册
|
|
|
if (user.getAccountId()!=null&&user.getAccountId()!=""){//已经注册
|
|
|
//判断是否认证
|
|
@@ -288,7 +291,7 @@ public class EsignController extends ApiBaseController {
|
|
|
int result = eSignService.updatePersonalAccount(user);
|
|
|
if (result > 0){
|
|
|
//获取认证路径
|
|
|
- String url = personRealnVerifyService.personRealnVerify(user.getAccountId());
|
|
|
+ String url = personRealnVerifyService.personRealnVerify(user.getAccountId(),redirectUrl);
|
|
|
return AjaxResult.success("url",url);
|
|
|
}else{
|
|
|
return AjaxResult.error("认证失败");
|
|
@@ -299,7 +302,7 @@ public class EsignController extends ApiBaseController {
|
|
|
SysUser euser = eSignService.createPersonalAccount(user);
|
|
|
if (euser!=null) {
|
|
|
//注册完以后获取认证路径
|
|
|
- String url = personRealnVerifyService.personRealnVerify(euser.getAccountId());
|
|
|
+ String url = personRealnVerifyService.personRealnVerify(euser.getAccountId(),redirectUrl);
|
|
|
return AjaxResult.success("url", url);
|
|
|
}else {
|
|
|
return AjaxResult.error(500,"注册失败");
|
|
@@ -316,7 +319,9 @@ public class EsignController extends ApiBaseController {
|
|
|
*/
|
|
|
@ApiOperation(value = "E签宝企业注册返回认证接口",
|
|
|
notes = "参数:{" +
|
|
|
- "userId:'123',customersName:'机构名称(XXX商贸公司)',orgLegalIdNumber:'企业法定代表人证件号','orgLegalName':'企业法定代表人名称'}" +
|
|
|
+ "userId:'123',customersName:'机构名称(XXX商贸公司)'," +
|
|
|
+ "orgLegalIdNumber:'企业法定代表人证件号','orgLegalName':'企业法定代表人名称'" +
|
|
|
+ ",'redirectUrl':'认证成功跳转url'}" +
|
|
|
"错误:" +
|
|
|
"301 企业已经注册且认证" +
|
|
|
"201 个人未注册" +
|
|
@@ -334,6 +339,7 @@ public class EsignController extends ApiBaseController {
|
|
|
String customersName = obj.getString("customersName");
|
|
|
String orgLegalIdNumber = obj.getString("orgLegalIdNumber");
|
|
|
String orgLegalName = obj.getString("orgLegalName");
|
|
|
+ String redirectUrl = obj.getString("redirectUrl");
|
|
|
SysUser user = userService.selectUserById(userId);
|
|
|
// CustomersExt customersExt = obj.parseBean(CustomersExt.class);
|
|
|
CustomersExt customersExt = customersExtService.selectCustomersExtById(user.getSysUserExt().getOrgCode());
|
|
@@ -359,7 +365,7 @@ public class EsignController extends ApiBaseController {
|
|
|
int result = eSignService.updateThirdParty(customersExt);
|
|
|
if (result>0){
|
|
|
//获取认证路径
|
|
|
- String url = organRealVerifyService.organRealVerify(customersExt.getOrgId(),customersExt.getCreator());
|
|
|
+ String url = organRealVerifyService.organRealVerify(customersExt.getOrgId(),customersExt.getCreator(),redirectUrl);
|
|
|
return AjaxResult.success("url",url);
|
|
|
}else{
|
|
|
return AjaxResult.error("认证失败");
|
|
@@ -370,7 +376,7 @@ public class EsignController extends ApiBaseController {
|
|
|
CustomersExt ecustomersExt = eSignService.createThirdParty(customersExt);
|
|
|
if (ecustomersExt!=null) {
|
|
|
//注册完以后获取认证路径
|
|
|
- String url = organRealVerifyService.organRealVerify(ecustomersExt.getOrgId(),ecustomersExt.getCreator());
|
|
|
+ String url = organRealVerifyService.organRealVerify(ecustomersExt.getOrgId(),ecustomersExt.getCreator(),redirectUrl);
|
|
|
return AjaxResult.success("url", url);
|
|
|
}else {
|
|
|
return AjaxResult.error(500,"注册失败");
|