Browse Source

增加获取个人和企业认证信息接口

qxm 5 years ago
parent
commit
933b42c62c

+ 28 - 0
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/EsignController.java

@@ -24,6 +24,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * @description:e签宝认证
  * @author:qxm
@@ -346,6 +349,31 @@ public class EsignController extends ApiBaseController {
         }
     }
 
+    @ApiOperation(value = "获取企业\\个人认证情况信息", notes = "参数:{'userId':'XXXXXXX'}" +
+            "\n(userId:用户id)")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params", paramType = "body")
+    })
+    @PostMapping("getOrgOrPersonalVerify")
+    public Object getOrgOrPersonalVerify() {
+        ParameterObject obj = getParameterObject();
+        obj.checkParameterNotNull("userId");
+        String userId = obj.getString("userId");
+        Map map = new HashMap(5);
+        SysUser sysUser = userService.selectUserById(Long.parseLong(userId));
+        if (sysUser!=null){
+            map.put("user",sysUser);
+            CustomersExt customersExt = customersExtService.selectCustomersExtById(sysUser.getSysUserExt().getOrgCode());
+            if (customersExt!=null){
+                map.put("customers",customersExt);
+                return AjaxResult.success(map);
+            }else{
+                return AjaxResult.error("经销商未注册");
+            }
+        }else{
+            return AjaxResult.error("用户不存在");
+        }
+    }
 //    /**
 //     * @descption: e签宝修改个人信息
 //     * @param: