|
@@ -8,6 +8,7 @@ import com.diagbot.entity.Organization;
|
|
|
import com.diagbot.entity.User;
|
|
|
import com.diagbot.entity.UserAuthentication;
|
|
|
import com.diagbot.enums.AuthStatusEnum;
|
|
|
+import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.OrganizationTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -61,7 +62,7 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
|
|
|
//更新机构信息
|
|
|
QueryWrapper<Organization> qwOrganization = new QueryWrapper<>();
|
|
|
qwOrganization.eq("name", userAuthenticationVO.getOrganization());
|
|
|
- qwOrganization.eq("is_deleted", "N");
|
|
|
+ qwOrganization.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
Organization organization = organizationFacade.getOne(qwOrganization);
|
|
|
if (organization == null) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS,
|
|
@@ -81,7 +82,7 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
|
|
|
//更新验证信息
|
|
|
QueryWrapper<UserAuthentication> qwAuthentication = new QueryWrapper<>();
|
|
|
qwAuthentication.eq("user_id", userId);
|
|
|
- qwAuthentication.eq("is_deleted", "N");
|
|
|
+ qwAuthentication.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
UserAuthentication userAuthentication = this.getOne(qwAuthentication);
|
|
|
if (userAuthentication == null) {
|
|
|
userAuthentication = new UserAuthentication();
|
|
@@ -115,10 +116,12 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
|
|
|
public UserAuthenticationDTO getuserAuthenticationInfo() {
|
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
|
User user = userFacade.getById(userId);
|
|
|
+ //密码置空
|
|
|
+ user.setPassword(null);
|
|
|
Organization organization = organizationFacade.getByUserId(userId);
|
|
|
QueryWrapper<UserAuthentication> qw = new QueryWrapper<>();
|
|
|
qw.eq("user_id", userId);
|
|
|
- qw.eq("is_deleted", "N");
|
|
|
+ qw.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
UserAuthentication userAuthentication = this.getOne(qw);
|
|
|
UserAuthenticationDTO userAuthenticationDTO = new UserAuthenticationDTO();
|
|
|
userAuthenticationDTO.setUser(user);
|
|
@@ -141,11 +144,11 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
|
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
|
QueryWrapper<UserAuthentication> qw = new QueryWrapper<>();
|
|
|
qw.eq("user_id", userId);
|
|
|
- qw.eq("is_deleted", "N");
|
|
|
+ qw.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
UserAuthentication userAuthentication = this.getOne(qw);
|
|
|
Map<Integer, Object> map = new HashMap<>();
|
|
|
if (userAuthentication == null) {
|
|
|
- map.put(99, "当前用户没有认证信息");
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS, "当前用户没有认证信息");
|
|
|
} else {
|
|
|
Integer status = userAuthentication.getStatus();
|
|
|
String statusName = AuthStatusEnum.getName(status);
|
|
@@ -163,7 +166,7 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
|
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
|
QueryWrapper<UserAuthentication> qw = new QueryWrapper<>();
|
|
|
qw.eq("user_id", userId);
|
|
|
- qw.eq("is_deleted", "N");
|
|
|
+ qw.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
UserAuthentication userAuthentication = this.getOne(qw);
|
|
|
|
|
|
QueryAuthProgressDTO queryAuthProgressDTO = new QueryAuthProgressDTO();
|