|
|
|
@ -61,7 +61,6 @@ public class PushEnterpriseController {
@@ -61,7 +61,6 @@ public class PushEnterpriseController {
|
|
|
|
|
@GetMapping("/getAuthData") |
|
|
|
|
public R getAuthData() { |
|
|
|
|
return R.ok(iPushEnterpriseService.getOne(Wrappers.<PushEnterprise>lambdaQuery() |
|
|
|
|
.eq(PushEnterprise::getStatus, 1) |
|
|
|
|
.eq(PushEnterprise::getUserId, SecurityUtils.getUser().getId()))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -72,8 +71,9 @@ public class PushEnterpriseController {
@@ -72,8 +71,9 @@ public class PushEnterpriseController {
|
|
|
|
|
if (!StrUtil.equals(SecurityUtils.getUser().getUserType(), "2")) { |
|
|
|
|
throw new CheckedException("当前用户不是企业用户请用企业用户登录后重试!"); |
|
|
|
|
} |
|
|
|
|
if(iPushEnterpriseService.count(Wrappers.<PushEnterprise>lambdaQuery().eq(PushEnterprise::getUserId, SecurityUtils.getUser().getId())) > 0) { |
|
|
|
|
throw new CheckedException("当前企业用户已经绑定了认证信息不能重复认证!"); |
|
|
|
|
if(iPushEnterpriseService.count(Wrappers.<PushEnterprise>lambdaQuery() |
|
|
|
|
.eq(PushEnterprise::getUserId, SecurityUtils.getUser().getId())) > 0) { |
|
|
|
|
throw new CheckedException("当前企业用户下已经存在认证数据!"); |
|
|
|
|
} |
|
|
|
|
if (StrUtil.isBlank(pushEnterprise.getUserId())) pushEnterprise.setUserId(SecurityUtils.getUser().getId()); |
|
|
|
|
iPushEnterpriseService.save(pushEnterprise); |
|
|
|
|