|  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotations.TableId; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotations.TableName; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.enums.IdType; | 
|---|
|  |  |  | import com.zy.system.service.UserService; | 
|---|
|  |  |  | import com.core.common.Cools; | 
|---|
|  |  |  | import com.core.common.SpringUtils; | 
|---|
|  |  |  | import com.zy.system.service.UserService; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModelProperty; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.io.Serializable; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @TableName("sys_user_login") | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | public class UserLogin implements Serializable { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private static final long serialVersionUID = 1L; | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 所属项目 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "所属项目") | 
|---|
|  |  |  | @ApiModelProperty(value = "所属项目") | 
|---|
|  |  |  | @TableField("host_id") | 
|---|
|  |  |  | private Long hostId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 员工 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | 
|---|
|  |  |  | @TableField("create_time") | 
|---|
|  |  |  | private Date createTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 登录系统 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @TableField("system") | 
|---|
|  |  |  | private String system; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Long getId() { | 
|---|
|  |  |  | return id; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | public void setHostId(Long hostId) { | 
|---|
|  |  |  | this.hostId = hostId; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Long getUserId() { | 
|---|
|  |  |  | return userId; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUserUsername(){ | 
|---|
|  |  |  | public String getUserUsername() { | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.selectById(this.userId); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | if (!Cools.isEmpty(user)) { | 
|---|
|  |  |  | return user.getUsername(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void setUserId(Long userId) { | 
|---|
|  |  |  | this.userId = userId; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | return createTime; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.createTime)){ | 
|---|
|  |  |  | public String getCreateTime$() { | 
|---|
|  |  |  | if (Cools.isEmpty(this.createTime)) { | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); | 
|---|
|  |  |  | 
|---|
|  |  |  | this.createTime = createTime; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getSystem() { | 
|---|
|  |  |  | return system; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void setSystem(String system) { | 
|---|
|  |  |  | this.system = system; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|