|
@@ -69,9 +69,9 @@ public class WxPortalController extends ApiBaseController {
|
|
* @date: 2020-10-12 14:04
|
|
* @date: 2020-10-12 14:04
|
|
*/
|
|
*/
|
|
|
|
|
|
- @ApiOperation(value = "绑定微信用户和系统用户",
|
|
|
|
|
|
+ @ApiOperation(value = "E签宝个人注册返回认证接口",
|
|
notes = "参数:{" +
|
|
notes = "参数:{" +
|
|
- "username:'admin',loginName:'admin'}" +
|
|
|
|
|
|
+ "userId:'123'}" +
|
|
"错误:" +
|
|
"错误:" +
|
|
"301 用户已经注册且认证" +
|
|
"301 用户已经注册且认证" +
|
|
"500 注册失败" +
|
|
"500 注册失败" +
|
|
@@ -84,11 +84,11 @@ public class WxPortalController extends ApiBaseController {
|
|
public Object createPersonalAccount(){
|
|
public Object createPersonalAccount(){
|
|
ParameterObject obj = getParameterObject();
|
|
ParameterObject obj = getParameterObject();
|
|
//判断参数
|
|
//判断参数
|
|
- obj.checkParameterNotNull("loginName");
|
|
|
|
- String loginName = obj.getString("loginName");
|
|
|
|
|
|
+ obj.checkParameterNotNull("userId");
|
|
|
|
+ String userId = obj.getString("userId");
|
|
// SysUser user = obj.parseBean(SysUser.class);
|
|
// SysUser user = obj.parseBean(SysUser.class);
|
|
//根据用户loginName查询用户信息
|
|
//根据用户loginName查询用户信息
|
|
- SysUser user = userService.selectUserByLoginName(loginName);
|
|
|
|
|
|
+ SysUser user = userService.selectUserById(Long.parseLong(userId));
|
|
//判断是否注册
|
|
//判断是否注册
|
|
if (user.getAccountId()!=null&&user.getAccountId()!=""){//已经注册
|
|
if (user.getAccountId()!=null&&user.getAccountId()!=""){//已经注册
|
|
//判断是否认证
|
|
//判断是否认证
|
|
@@ -119,19 +119,46 @@ public class WxPortalController extends ApiBaseController {
|
|
* @auther: ZhangDing
|
|
* @auther: ZhangDing
|
|
* @date: 2020-10-12 15:26
|
|
* @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
|
|
@ResponseBody
|
|
- @RequestMapping("/createThirdParty")
|
|
|
|
|
|
+ @PostMapping("/createThirdParty")
|
|
public Object createThirdParty(){
|
|
public Object createThirdParty(){
|
|
ParameterObject obj = getParameterObject();
|
|
ParameterObject obj = getParameterObject();
|
|
- obj.checkParameterNotNull("chainsCode,creator,customersName");
|
|
|
|
- String chainsCode = obj.getString("chainsCode");
|
|
|
|
|
|
+ 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 = obj.parseBean(CustomersExt.class);
|
|
- CustomersExt customersExt = customersExtService.selectCustomersExtById(chainsCode);
|
|
|
|
|
|
+ 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 (customersExt.getOrgId()!=null&&customersExt.getOrgId()!=""){//已经注册
|
|
//判断是否认证
|
|
//判断是否认证
|
|
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());
|
|
String url = organRealVerifyService.organRealVerify(customersExt.getOrgId(),customersExt.getCreator());
|
|
@@ -158,7 +185,7 @@ public class WxPortalController extends ApiBaseController {
|
|
* @date: 2020-10-13 13:31
|
|
* @date: 2020-10-13 13:31
|
|
*/
|
|
*/
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- @RequestMapping("/updatePersonalAccount")
|
|
|
|
|
|
+ @PostMapping("/updatePersonalAccount")
|
|
public Object updatePersonalAccount(){
|
|
public Object updatePersonalAccount(){
|
|
ParameterObject obj = getParameterObject();
|
|
ParameterObject obj = getParameterObject();
|
|
obj.checkParameterNotNull("accountId");
|
|
obj.checkParameterNotNull("accountId");
|
|
@@ -174,7 +201,7 @@ public class WxPortalController extends ApiBaseController {
|
|
* @date: 2020-10-13 14:32
|
|
* @date: 2020-10-13 14:32
|
|
*/
|
|
*/
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- @RequestMapping("/updateThirdParty")
|
|
|
|
|
|
+ @PostMapping("/updateThirdParty")
|
|
public Object updateThirdParty(){
|
|
public Object updateThirdParty(){
|
|
ParameterObject obj = getParameterObject();
|
|
ParameterObject obj = getParameterObject();
|
|
obj.checkParameterNotNull("orgId");
|
|
obj.checkParameterNotNull("orgId");
|