完善企业认证失败后删除企业账户信息

main
rong.liu 11 months ago
parent 3f6eb37476
commit 144f8fe6a5
  1. 14
      users/src/main/java/com/huoran/users/controller/AliRealNameAuthenticationController.java

@ -272,6 +272,20 @@ public class AliRealNameAuthenticationController {
return R.ok("提交成功,请等待审核!");
} else {
errorMsg = info.getReason();
//失败后删除本次生成的企业团队信息
QueryWrapper<HrUserAccount> accountQueryWrapper = new QueryWrapper<>();
accountQueryWrapper.eq("app_open_id", enterpriseCertification.getOpenId());
accountQueryWrapper.eq("platform_id", enterpriseCertification.getPlatformSource());
HrUserAccount userAccount = userAccountService.getOne(accountQueryWrapper);
userInfoService.removeById(userAccount.getUserId());
userAccountService.removeById(userAccount);
//
return R.error().put("message", info.getReason());
}
} catch (Exception e) {

Loading…
Cancel
Save