You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.6 KiB
40 lines
1.6 KiB
|
1 month ago
|
package com.crm.auth.service;
|
||
|
|
|
||
|
|
import com.crm.auth.domain.dto.UserListDTO;
|
||
|
|
import com.crm.auth.domain.dto.UserStatsVO;
|
||
|
|
import com.crm.auth.domain.entity.AuthUser;
|
||
|
|
import com.crm.auth.domain.param.UserPageParam;
|
||
|
|
import com.crm.base.domain.result.PageResult;
|
||
|
|
import com.crm.base.service.IBaseService;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
public interface IAuthUserService extends IBaseService<AuthUser> {
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 按手机号查用户(跨平台身份映射用),无则返回 null
|
||
|
|
*/
|
||
|
|
AuthUser getByMobile(String mobile);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 原子设置用户的主部门与全部兼职部门(全量替换式,照角色分配先例)。
|
||
|
|
* <p>校验:用户存在、所有部门存在、兼职不得等于主部门(兼职列表先去重);
|
||
|
|
* 主部门可为 null(仅兼职的用户合法);层级重叠(兼职到主部门父/子)不拦截。</p>
|
||
|
|
*
|
||
|
|
* @param userId 目标用户 ID
|
||
|
|
* @param primaryDeptId 主部门 ID,可为 null(清空主部门)
|
||
|
|
* @param partTimeDeptIds 兼职部门 ID 列表,可为 null/空(清空兼职)
|
||
|
|
*/
|
||
|
|
void assignDepts(Long userId, Long primaryDeptId, List<Long> partTimeDeptIds);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 用户管理-用户列表分页(部门子树 × 在职状态 × 关键词 × 最后登录时间),反范式部门名/角色名。
|
||
|
|
*/
|
||
|
|
PageResult<UserListDTO> pageUserList(UserPageParam param);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 用户管理-指标卡统计(部门总数/在职/离职/待分配),跟随部门子树,与列表过滤解耦。
|
||
|
|
*/
|
||
|
|
UserStatsVO stats(Long deptId);
|
||
|
|
}
|