mirror of https://gitee.com/topiam/eiam
⚡ 优化代码
parent
1829742803
commit
485e0a34fa
|
@ -40,23 +40,23 @@ import lombok.NonNull;
|
|||
public class Actor implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1144169992714000310L;
|
||||
private static final long serialVersionUID = -1144169992714000310L;
|
||||
|
||||
/**
|
||||
* 行动者ID
|
||||
*/
|
||||
@NonNull
|
||||
private String id;
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 行动者类型
|
||||
*/
|
||||
@NonNull
|
||||
private UserType type;
|
||||
private UserType type;
|
||||
|
||||
/**
|
||||
* 身份验证类型
|
||||
*/
|
||||
private String authType;
|
||||
private String authType;
|
||||
|
||||
}
|
||||
|
|
|
@ -64,6 +64,18 @@ public class AdministratorEntity extends LogicDeleteEntity<Long> {
|
|||
@Column(name = "username_")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Column(name = "full_name")
|
||||
private String fullName;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@Column(name = "nick_name")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
|
|
|
@ -71,6 +71,10 @@ public class CurrentUserEndpoint {
|
|||
result.setAccountId(userDetails.getId());
|
||||
//用户名
|
||||
result.setUsername(administrator.getUsername());
|
||||
//姓名
|
||||
result.setFullName(administrator.getFullName());
|
||||
//昵称
|
||||
result.setNickName(administrator.getNickName());
|
||||
//头像
|
||||
if (StringUtils.isEmpty(administrator.getAvatar())) {
|
||||
result.setAvatar(bufferedImageToBase64(generateAvatarImg(administrator.getUsername())));
|
||||
|
@ -105,6 +109,18 @@ public class CurrentUserEndpoint {
|
|||
@Schema(description = "用户名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Schema(description = "姓名")
|
||||
private String fullName;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@Schema(description = "昵称")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
|
|
|
@ -277,13 +277,13 @@ public interface UserConverter {
|
|||
if (audit.getEventType().getCode().equals(PortalEventType.LOGIN_PORTAL.getCode())) {
|
||||
result.setAppName(PORTAL.getDesc());
|
||||
}
|
||||
UserAgent userAgent=audit.getUserAgent();
|
||||
GeoLocation geoLocation= audit.getGeoLocation();
|
||||
UserAgent userAgent = audit.getUserAgent();
|
||||
GeoLocation geoLocation = audit.getGeoLocation();
|
||||
result.setEventTime(audit.getEventTime());
|
||||
result.setClientIp(geoLocation.getIp());
|
||||
result.setLocation(geoLocation.getCityName());
|
||||
result.setBrowser(userAgent.getBrowser());
|
||||
result.setPlatform(userAgent.getPlatform()+" "+userAgent.getPlatformVersion());
|
||||
result.setPlatform(userAgent.getPlatform() + " " + userAgent.getPlatformVersion());
|
||||
result.setEventStatus(audit.getEventStatus());
|
||||
list.add(result);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue