| | |
| | | package cn.gistack.auth.service; |
| | | |
| | | import cn.gistack.auth.constant.AuthConstant; |
| | | import cn.gistack.system.entity.Dept; |
| | | import cn.gistack.system.entity.Role; |
| | | import com.alibaba.nacos.common.utils.StringUtils; |
| | | import io.jsonwebtoken.Claims; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | } |
| | | user.setRoleId(headerRole); |
| | | } |
| | | |
| | | R<Role> roleRes = sysClient.getRole(Long.parseLong(user.getRoleId())); |
| | | if (roleRes.isSuccess()){ |
| | | userInfo.getDetail().set("roleName",roleRes.getData().getRoleName()); |
| | | } |
| | | |
| | | R<Dept> deptRes = sysClient.getDept(Long.parseLong(user.getDeptId())); |
| | | if (deptRes.isSuccess()){ |
| | | userInfo.getDetail().set("deptName",deptRes.getData().getFullName()); |
| | | } |
| | | |
| | | // 成功则清除登录错误次数 |
| | | delFailCount(tenantId, username); |
| | | return new BladeUserDetails(user.getId(), |