|
@@ -1,14 +1,6 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-
|
|
|
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
import com.diagbot.dto.QueryAuthProgressDTO;
|
|
|
import com.diagbot.dto.UserAuthenticationDTO;
|
|
|
import com.diagbot.dto.WaitAuthenDTO;
|
|
@@ -22,6 +14,12 @@ import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.UserAuthenticationServiceImpl;
|
|
|
import com.diagbot.util.UserUtils;
|
|
|
import com.diagbot.vo.UserAuthenticationVO;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @Description:用户认证业务层
|
|
@@ -61,7 +59,10 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
|
|
|
"当前用户没有关联机构,不允许验证");
|
|
|
}
|
|
|
//更新机构信息
|
|
|
- Organization organization = organizationFacade.getByName(userAuthenticationVO.getOrganization());
|
|
|
+ QueryWrapper<Organization> qwOrganization = new QueryWrapper<>();
|
|
|
+ qwOrganization.eq("name", userAuthenticationVO.getOrganization());
|
|
|
+ qwOrganization.eq("is_deleted", "N");
|
|
|
+ Organization organization = organizationFacade.getOne(qwOrganization);
|
|
|
if (organization == null) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS,
|
|
|
"找不到机构【" + userAuthenticationVO.getOrganization() + "】");
|
|
@@ -78,10 +79,10 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
|
|
|
organizationFacade.updateById(organization);
|
|
|
|
|
|
//更新验证信息
|
|
|
- QueryWrapper<UserAuthentication> qw = new QueryWrapper<>();
|
|
|
- qw.eq("user_id", userId);
|
|
|
- qw.eq("is_deleted", "N");
|
|
|
- UserAuthentication userAuthentication = this.getOne(qw);
|
|
|
+ QueryWrapper<UserAuthentication> qwAuthentication = new QueryWrapper<>();
|
|
|
+ qwAuthentication.eq("user_id", userId);
|
|
|
+ qwAuthentication.eq("is_deleted", "N");
|
|
|
+ UserAuthentication userAuthentication = this.getOne(qwAuthentication);
|
|
|
if (userAuthentication == null) {
|
|
|
userAuthentication = new UserAuthentication();
|
|
|
userAuthentication.setCreator(userId.toString());
|