Browse Source

E签宝注册认证个人和企业信息修改

qxm 4 năm trước cách đây
mục cha
commit
95cce64e7f

+ 25 - 10
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/EsignController.java

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

+ 2 - 2
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/ESignServiceImpl.java

@@ -76,8 +76,8 @@ public class ESignServiceImpl implements ESignService {
         JSONObject json = new JSONObject();
         json.put("thirdPartyUserId",user.getLoginName());
         json.put("name",user.getUserName());
-//        json.put("idType","CRED_PSN_CH_IDCARD");
-//        json.put("idNumber",user.getIdNumber());
+        json.put("idType","CRED_PSN_CH_IDCARD");
+        json.put("idNumber",user.getIdNumber());
 //        json.put("mobile",user.getPhonenumber());
 //        json.put("email",user.getEmail());
         JSONObject resule = eSignHttpUtil.doPostGetJson(ESignUrl.CreatePersonalAccount,json);