|
|
@@ -84,19 +84,13 @@ public class User {
|
|
|
judgeIsSystemAdministrator();
|
|
|
|
|
|
EvaluationAgency evaluationAgency = agencyUser.getEvaluationAgency();
|
|
|
- if(evaluationAgency.getIsAuthentication() == AuthenticationStatus.isNotAuthenticated){
|
|
|
- throw new BaseException("当前是未通过认证状态,不可通过认证,需对认证信息进行修改后再提交认证申请");
|
|
|
- }else if(evaluationAgency.getIsAuthentication() == AuthenticationStatus.isAuthenticated){
|
|
|
- throw new BaseException("当前已通过认证,不可再次进行认证");
|
|
|
- }else{
|
|
|
- evaluationAgency.passAuthentication();
|
|
|
- List<Role> roleList = this.getRoleList();
|
|
|
- Role role = new Role();
|
|
|
- role.setId(2L);
|
|
|
- roleList.add(role);
|
|
|
- agencyUser.setRoleList(roleList);
|
|
|
- return agencyUser;
|
|
|
- }
|
|
|
+ evaluationAgency.passAuthentication();
|
|
|
+ List<Role> roleList = this.getRoleList();
|
|
|
+ Role role = new Role();
|
|
|
+ role.setId(2L);
|
|
|
+ roleList.add(role);
|
|
|
+ agencyUser.setRoleList(roleList);
|
|
|
+ return agencyUser;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -109,19 +103,8 @@ public class User {
|
|
|
judgeIsSystemAdministrator();
|
|
|
|
|
|
EvaluationAgency evaluationAgency = agencyUser.getEvaluationAgency();
|
|
|
- if(evaluationAgency.getIsDeleted() == DeletedStatus.isDeleted){
|
|
|
- throw new BaseException("当前认证信息已被删除,不可做认证状态改变操作");
|
|
|
- }else {
|
|
|
- if(evaluationAgency.getIsAuthentication() == AuthenticationStatus.isNotAuthenticated){
|
|
|
- throw new BaseException("当前已是未通过认证状态,不可再次拒绝认证");
|
|
|
- }else if(evaluationAgency.getIsAuthentication() == AuthenticationStatus.isAuthenticated){
|
|
|
- throw new BaseException("当前已通过认证,不可拒绝认证");
|
|
|
- }else {
|
|
|
- evaluationAgency.rejectAuthentication(explain);
|
|
|
- return agencyUser;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ evaluationAgency.rejectAuthentication(explain);
|
|
|
+ return agencyUser;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -175,14 +158,8 @@ public class User {
|
|
|
judgeIsSystemAdministrator();
|
|
|
|
|
|
PersonalAuthentication personalAuth = personalUser.getPersonalAuthentication();
|
|
|
- if(personalAuth.getIsAuthentication() == AuthenticationStatus.isNotAuthenticated){
|
|
|
- throw new BaseException("当前是未通过认证状态,不可通过认证,需对认证信息进行修改后再提交认证申请");
|
|
|
- }else if(personalAuth.getIsAuthentication() == AuthenticationStatus.isAuthenticated){
|
|
|
- throw new BaseException("当前已通过认证,不可再次进行认证");
|
|
|
- }else{
|
|
|
- personalAuth.passAuthentication();
|
|
|
- return personalUser;
|
|
|
- }
|
|
|
+ personalAuth.passAuthentication();
|
|
|
+ return personalUser;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -195,18 +172,8 @@ public class User {
|
|
|
judgeIsSystemAdministrator();
|
|
|
|
|
|
PersonalAuthentication personalAuth = personalUser.getPersonalAuthentication();
|
|
|
- if(personalAuth.getIsDeleted() == DeletedStatus.isDeleted){
|
|
|
- throw new BaseException("当前认证信息已被删除,不可做认证状态改变操作");
|
|
|
- }else {
|
|
|
- if(personalAuth.getIsAuthentication() == AuthenticationStatus.isNotAuthenticated){
|
|
|
- throw new BaseException("当前已是未通过认证状态,不可再次拒绝认证");
|
|
|
- }else if(personalAuth.getIsAuthentication() == AuthenticationStatus.isAuthenticated){
|
|
|
- throw new BaseException("当前已通过认证,不可拒绝认证");
|
|
|
- }else {
|
|
|
- personalAuth.rejectAuthentication(explain);
|
|
|
- return personalUser;
|
|
|
- }
|
|
|
- }
|
|
|
+ personalAuth.rejectAuthentication(explain);
|
|
|
+ return personalUser;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -281,18 +248,8 @@ public class User {
|
|
|
judgeIsSystemAdministrator();
|
|
|
|
|
|
EnterpriseAuthentication enterpriseAuth = enterpriseUser.getEnterpriseAuthentication();
|
|
|
- if(enterpriseAuth.getIsDeleted() == DeletedStatus.isDeleted){
|
|
|
- throw new BaseException("当前认证信息已被删除,不可做认证状态改变操作");
|
|
|
- }else {
|
|
|
- if(enterpriseAuth.getIsAuthentication() == AuthenticationStatus.isNotAuthenticated){
|
|
|
- throw new BaseException("当前已是未通过认证状态,不可再次拒绝认证");
|
|
|
- }else if(enterpriseAuth.getIsAuthentication() == AuthenticationStatus.isAuthenticated){
|
|
|
- throw new BaseException("当前已通过认证,不可拒绝认证");
|
|
|
- }else {
|
|
|
- enterpriseAuth.rejectAuthentication(explain);
|
|
|
- return enterpriseUser;
|
|
|
- }
|
|
|
- }
|
|
|
+ enterpriseAuth.rejectAuthentication(explain);
|
|
|
+ return enterpriseUser;
|
|
|
}
|
|
|
|
|
|
/**
|