|
@@ -65,153 +65,7 @@ public class WxPortalController extends ApiBaseController {
|
|
|
List<WxBanner> wxBannerList = wxBannerService.selectWxBannerList(wxBanner);
|
|
|
return AjaxResult.success().putKV("magnets",wxMagnetList).putKV("banners",wxBannerList);
|
|
|
}
|
|
|
- /**
|
|
|
- * @descption: 个人注册
|
|
|
- * @param:
|
|
|
- * @return:
|
|
|
- * @auther: ZhangDing
|
|
|
- * @date: 2020-10-12 14:04
|
|
|
- */
|
|
|
|
|
|
- @ApiOperation(value = "E签宝个人注册返回认证接口",
|
|
|
- notes = "参数:{" +
|
|
|
- "userId:'123'}" +
|
|
|
- "错误:" +
|
|
|
- "301 用户已经注册且认证" +
|
|
|
- "500 注册失败" +
|
|
|
- "")
|
|
|
- @ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "params" , paramType = "body")
|
|
|
- })
|
|
|
- @ApiPassToken
|
|
|
- @PostMapping("/createPersonalAccount")
|
|
|
- public Object createPersonalAccount(){
|
|
|
- ParameterObject obj = getParameterObject();
|
|
|
- //判断参数
|
|
|
- obj.checkParameterNotNull("userId");
|
|
|
- String userId = obj.getString("userId");
|
|
|
-// SysUser user = obj.parseBean(SysUser.class);
|
|
|
- //根据用户loginName查询用户信息
|
|
|
- SysUser user = userService.selectUserById(Long.parseLong(userId));
|
|
|
- //判断是否注册
|
|
|
- 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);
|
|
|
- }
|
|
|
- }else {//没有注册
|
|
|
- //去注册
|
|
|
- SysUser euser = eSignService.createPersonalAccount(user);
|
|
|
- if (euser!=null) {
|
|
|
- //注册完以后获取认证路径
|
|
|
- String url = personRealnVerifyService.personRealnVerify(euser.getAccountId());
|
|
|
- return AjaxResult.success("url", url);
|
|
|
- }else {
|
|
|
- return AjaxResult.error(500,"注册失败");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @descption: 公司注册
|
|
|
- * @param:
|
|
|
- * @return:
|
|
|
- * @auther: ZhangDing
|
|
|
- * @date: 2020-10-12 15:26
|
|
|
- */
|
|
|
- @ApiOperation(value = "E签宝企业注册返回认证接口",
|
|
|
- notes = "参数:{" +
|
|
|
- "userId:'123',customersName:'XXX商贸公司',orgLegalIdNumber:'企业法定代表人证件号','orgLegalName':'企业法定代表人名称'}" +
|
|
|
- "错误:" +
|
|
|
- "301 企业已经注册且认证" +
|
|
|
- "201 个人未注册" +
|
|
|
- "500 注册失败" +
|
|
|
- "")
|
|
|
- @ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "params" , paramType = "body")
|
|
|
- })
|
|
|
- @ResponseBody
|
|
|
- @PostMapping("/createThirdParty")
|
|
|
- public Object createThirdParty(){
|
|
|
- ParameterObject obj = getParameterObject();
|
|
|
- obj.checkParameterNotNull("userId,customersName,orgLegalIdNumber,orgLegalName");
|
|
|
- Long userId = obj.getLong("userId");
|
|
|
- String customersName = obj.getString("customersName");
|
|
|
- String orgLegalIdNumber = obj.getString("orgLegalIdNumber");
|
|
|
- String orgLegalName = obj.getString("orgLegalName");
|
|
|
- SysUser user = userService.selectUserById(userId);
|
|
|
-// CustomersExt customersExt = obj.parseBean(CustomersExt.class);
|
|
|
- CustomersExt customersExt = customersExtService.selectCustomersExtById(user.getSysUserExt().getOrgCode());
|
|
|
- if (customersExt==null){
|
|
|
- customersExt = new CustomersExt();
|
|
|
- if (user.getAccountId()!=null&&user.getAccountId()!="") {
|
|
|
- customersExt.setCreator(user.getAccountId());
|
|
|
- }else {
|
|
|
- return AjaxResult.error(201,"个人未注册");
|
|
|
- }
|
|
|
- customersExt.setChainsCode(user.getSysUserExt().getOrgCode());
|
|
|
- customersExt.setCustomersName(customersName);
|
|
|
- customersExt.setOrgLegalidNumber(orgLegalIdNumber);
|
|
|
- customersExt.setOrgLegalName(orgLegalName);
|
|
|
- }
|
|
|
- //判断是否注册
|
|
|
- if (customersExt.getOrgId()!=null&&customersExt.getOrgId()!=""){//已经注册
|
|
|
- //判断是否认证
|
|
|
- if ("1".equals(customersExt.getIsAuthentication())){//已认证
|
|
|
- return AjaxResult.error(301,"企业已经注册且认证");
|
|
|
- }else {//未认证
|
|
|
- //获取认证路径
|
|
|
- String url = organRealVerifyService.organRealVerify(customersExt.getOrgId(),customersExt.getCreator());
|
|
|
- return AjaxResult.success("url",url);
|
|
|
- }
|
|
|
- }else {//未注册
|
|
|
- //去注册
|
|
|
- CustomersExt ecustomersExt = eSignService.createThirdParty(customersExt);
|
|
|
- if (ecustomersExt!=null) {
|
|
|
- //注册完以后获取认证路径
|
|
|
- String url = organRealVerifyService.organRealVerify(ecustomersExt.getOrgId(),ecustomersExt.getCreator());
|
|
|
- return AjaxResult.success("url", url);
|
|
|
- }else {
|
|
|
- return AjaxResult.error(500,"注册失败");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @descption: e签宝修改个人信息
|
|
|
- * @param:
|
|
|
- * @return:
|
|
|
- * @auther: ZhangDing
|
|
|
- * @date: 2020-10-13 13:31
|
|
|
- */
|
|
|
- @ResponseBody
|
|
|
- @PostMapping("/updatePersonalAccount")
|
|
|
- public Object updatePersonalAccount(){
|
|
|
- ParameterObject obj = getParameterObject();
|
|
|
- obj.checkParameterNotNull("accountId");
|
|
|
- SysUser user = obj.parseBean(SysUser.class);
|
|
|
- return toAjax(eSignService.updatePersonalAccount(user));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @descption: e签宝修改公司信息
|
|
|
- * @param:
|
|
|
- * @return:
|
|
|
- * @auther: ZhangDing
|
|
|
- * @date: 2020-10-13 14:32
|
|
|
- */
|
|
|
- @ResponseBody
|
|
|
- @PostMapping("/updateThirdParty")
|
|
|
- public Object updateThirdParty(){
|
|
|
- ParameterObject obj = getParameterObject();
|
|
|
- obj.checkParameterNotNull("orgId");
|
|
|
- CustomersExt customersExt = obj.parseBean(CustomersExt.class);
|
|
|
- return toAjax(eSignService.updateThirdParty(customersExt));
|
|
|
- }
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "查询经销商人员列表", notes = "参数:{'userId':'XXXXXXX'}" +
|