feat(property): 新增入驻员工登录功能
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package org.dromara.property.api;
|
||||
|
||||
import org.dromara.common.core.exception.residentPerson.ResidentPersonException;
|
||||
import org.dromara.property.api.domain.vo.RemoteResidentPersonVo;
|
||||
import org.dromara.property.api.model.LoginResidentPerson;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -16,4 +18,13 @@ public interface RemoteResidentPersonService {
|
||||
|
||||
// 更新E8平台id
|
||||
Boolean updateE8Id(Long personId, Long e8Id);
|
||||
|
||||
/**
|
||||
* 通过手机号查询用户信息
|
||||
*
|
||||
* @param phone 手机号
|
||||
* @param tenantId 租户id
|
||||
* @return 结果
|
||||
*/
|
||||
LoginResidentPerson getResidentPersonInfo(String phone, String tenantId) throws ResidentPersonException;
|
||||
}
|
||||
|
@@ -0,0 +1,119 @@
|
||||
package org.dromara.property.api.model;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote LoginResidentPerson
|
||||
* @since 2025/9/5
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class LoginResidentPerson implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 所属单位id
|
||||
*/
|
||||
private Long unitId;
|
||||
|
||||
/**
|
||||
* 所属单位名称
|
||||
*/
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 用户唯一标识
|
||||
*/
|
||||
private String token;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 登录时间
|
||||
*/
|
||||
private Long loginTime;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
private Long expireTime;
|
||||
|
||||
/**
|
||||
* 登录IP地址
|
||||
*/
|
||||
private String ipaddr;
|
||||
|
||||
/**
|
||||
* 登录地点
|
||||
*/
|
||||
private String loginLocation;
|
||||
|
||||
/**
|
||||
* 浏览器类型
|
||||
*/
|
||||
private String browser;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 用户角色(1管理员2普通用户)
|
||||
*/
|
||||
private Integer userRoles;
|
||||
|
||||
/**
|
||||
* 客户端
|
||||
*/
|
||||
private String clientKey;
|
||||
|
||||
/**
|
||||
* 获取登录id
|
||||
*/
|
||||
public String getLoginId() {
|
||||
if (userType == null) {
|
||||
throw new IllegalArgumentException("用户类型不能为空");
|
||||
}
|
||||
if (userId == null) {
|
||||
throw new IllegalArgumentException("用户ID不能为空");
|
||||
}
|
||||
return userType + ":" + userId;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user