|
@@ -1,6 +1,7 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.diagbot.dto.AuthStatusDTO;
|
|
|
import com.diagbot.dto.QueryAuthProgressDTO;
|
|
|
import com.diagbot.dto.UserAuthenticationDTO;
|
|
|
import com.diagbot.dto.WaitAuthenDTO;
|
|
@@ -149,21 +150,22 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public Map<Integer, Object> getUserAuthenticationStatus() {
|
|
|
+ public AuthStatusDTO getUserAuthenticationStatus() {
|
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
|
QueryWrapper<UserAuthentication> qw = new QueryWrapper<>();
|
|
|
qw.eq("user_id", userId).
|
|
|
eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
UserAuthentication userAuthentication = this.getOne(qw);
|
|
|
- Map<Integer, Object> map = new HashMap<>();
|
|
|
+ AuthStatusDTO authStatusDTO = new AuthStatusDTO();
|
|
|
if (userAuthentication == null) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS, "当前用户没有认证信息");
|
|
|
} else {
|
|
|
Integer status = userAuthentication.getStatus();
|
|
|
String statusName = AuthStatusEnum.getName(status);
|
|
|
- map.put(status, statusName);
|
|
|
+ authStatusDTO.setAuthStatus(status);
|
|
|
+ authStatusDTO.setAuthStatusName(statusName);
|
|
|
}
|
|
|
- return map;
|
|
|
+ return authStatusDTO;
|
|
|
}
|
|
|
|
|
|
/**
|