|
@@ -43,41 +43,10 @@ public class User {
|
|
|
private EnterpriseAuthentication enterpriseAuthentication;
|
|
|
private SystemAdministratorToUser systemAdministratorToUser;
|
|
|
|
|
|
-
|
|
|
- public User() {
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public String toString() {
|
|
|
- return "User{" +
|
|
|
- "id=" + id +
|
|
|
- ", name='" + name + '\'' +
|
|
|
- ", userName='" + userName + '\'' +
|
|
|
- ", password='" + password + '\'' +
|
|
|
- ", gender='" + gender + '\'' +
|
|
|
- ", mobile='" + mobile + '\'' +
|
|
|
- ", email='" + email + '\'' +
|
|
|
- ", province='" + province + '\'' +
|
|
|
- ", city='" + city + '\'' +
|
|
|
- ", photoUrl='" + photoUrl + '\'' +
|
|
|
- ", isAvailable=" + isAvailable +
|
|
|
- ", isDeleted=" + isDeleted +
|
|
|
- ", createTime=" + createTime +
|
|
|
- ", regionalManager=" + regionalManager +
|
|
|
- ", evaluationAgency=" + evaluationAgency +
|
|
|
- ", personalAuthentication=" + personalAuthentication +
|
|
|
- ", systemAdministratorToUser=" + systemAdministratorToUser +
|
|
|
- ", roleList=" + roleList +
|
|
|
- '}';
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public User(UserPO userPO){
|
|
|
+ public User(UserPO userPO){
|
|
|
BeanUtils.copyProperties(userPO,this);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 机构认证——申请
|
|
|
* @param evaluationAgency
|
|
@@ -215,82 +184,6 @@ public class User {
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 企业认证——申请
|
|
|
- * @return
|
|
|
- */
|
|
|
-// public User applyEnterpriseAuthentication(EnterpriseAuthentication enterpriseAuth) {
|
|
|
-// if (this.getEvaluationAgency()!=null || this.getPersonalAuthentication()!=null || this.getEnterpriseAuthentication()!=null)
|
|
|
-// throw new BaseException("已有认证信息,不可再次认证");
|
|
|
-// this.setEnterpriseAuthentication(enterpriseAuth.applyAuthentication(this.id));
|
|
|
-// return this;
|
|
|
-// }
|
|
|
-
|
|
|
- /**
|
|
|
- * 企业认证——通过
|
|
|
- * @return
|
|
|
- */
|
|
|
-// public User passEnterpriseAuthApplication(User enterpriseUser) {
|
|
|
-// //判断是否为系统管理员
|
|
|
-// judgeIsSystemAdministrator();
|
|
|
-//
|
|
|
-// EnterpriseAuthentication enterpriseAuth = enterpriseUser.getEnterpriseAuthentication();
|
|
|
-// if(enterpriseAuth.getIsAuthentication() == AuthenticationStatus.isNotAuthenticated){
|
|
|
-// throw new BaseException("当前是未通过认证状态,不可通过认证,需对认证信息进行修改后再提交认证申请");
|
|
|
-// }else if(enterpriseAuth.getIsAuthentication() == AuthenticationStatus.isAuthenticated){
|
|
|
-// throw new BaseException("当前已通过认证,不可再次进行认证");
|
|
|
-// }else{
|
|
|
-// enterpriseAuth.passAuthentication();
|
|
|
-// List<Role> roleList = this.getRoleList();
|
|
|
-// Role role = new Role();
|
|
|
-// role.setId(5L);
|
|
|
-// roleList.add(role);
|
|
|
-// enterpriseUser.setRoleList(roleList);
|
|
|
-// return enterpriseUser;
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
- /**
|
|
|
- * 企业认证——驳回,并说明驳回原因
|
|
|
- * @param explain
|
|
|
- * @return
|
|
|
- */
|
|
|
-// public User enterpriseAuthReject(User enterpriseUser, String explain) {
|
|
|
-// //判断是否为系统管理员
|
|
|
-// judgeIsSystemAdministrator();
|
|
|
-//
|
|
|
-// EnterpriseAuthentication enterpriseAuth = enterpriseUser.getEnterpriseAuthentication();
|
|
|
-// enterpriseAuth.rejectAuthentication(explain);
|
|
|
-// return enterpriseUser;
|
|
|
-// }
|
|
|
-
|
|
|
- /**
|
|
|
- * 企业认证——修改
|
|
|
- * @param modifyAuth
|
|
|
- * @return
|
|
|
- */
|
|
|
-// public User updateEnterpriseAuthInfo(EnterpriseAuthentication modifyAuth){
|
|
|
-// if (this.getEnterpriseAuthentication() == null){
|
|
|
-// throw new BaseException("该用户未申请企业认证,无法修改");
|
|
|
-// }
|
|
|
-// if (this.getEvaluationAgency()!=null || this.getPersonalAuthentication()!=null)
|
|
|
-// throw new BaseException("已有其他认证信息,不可对认证未企业用户");
|
|
|
-// if (this.getEnterpriseAuthentication().getIsAuthentication() == AuthenticationStatus.isAuthenticated){
|
|
|
-// throw new BaseException("已通过认证,不可修改认证信息");
|
|
|
-// }
|
|
|
-// this.getEnterpriseAuthentication().updateAuthInfo(modifyAuth);
|
|
|
-// return this;
|
|
|
-// }
|
|
|
-
|
|
|
- /**
|
|
|
- * 企业认证——删除
|
|
|
- * @return
|
|
|
- */
|
|
|
-// public User deleteEnterpriseAuthInfo() {
|
|
|
-// this.getEnterpriseAuthentication().deleteAuth();
|
|
|
-// return this;
|
|
|
-// }
|
|
|
-
|
|
|
//判断是否为系统管理员
|
|
|
private void judgeIsSystemAdministrator(){
|
|
|
if(this.getSystemAdministratorToUser() == null){
|