| | |
| | | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; |
| | | import cn.iocoder.yudao.module.system.api.user.dto.AdminUserCreateReqDTO; |
| | | import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; |
| | | import cn.iocoder.yudao.module.system.api.user.dto.AdminUserSyncReqDTO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | |
| | | /** |
| | | * Admin 用户 API 接口 |
| | | * |
| | | * @author 芋道源码 |
| | | * @author 超级管理员 |
| | | */ |
| | | public interface AdminUserApi { |
| | | |
| | |
| | | Long createUser(AdminUserCreateReqDTO createReqDTO); |
| | | |
| | | /** |
| | | * 更新用户密码 |
| | | * |
| | | * @param id 用户编号 |
| | | * @param password 明文密码 |
| | | */ |
| | | void updateUserPassword(Long id, String password); |
| | | |
| | | /** |
| | | * 删除用户,但**不发布** {@code AdminUserDeletedEvent} |
| | | * |
| | | * 供 hrm 模块删除员工时联动删除账号,避免事件回环(员工删 → 账号删 → 员工删)。 |
| | | * |
| | | * @param id 用户编号 |
| | | */ |
| | | void deleteUserSilently(Long id); |
| | | |
| | | /** |
| | | * 将员工档案字段同步到系统账号,但**不发布** {@code AdminUserUpdatedEvent} |
| | | * |
| | | * 供 hrm 模块修改员工时反向同步账号,避免事件回环。 |
| | | * 只更新 DTO 中非空的字段。 |
| | | * |
| | | * @param reqDTO 同步信息 |
| | | */ |
| | | void updateUserForEmployee(AdminUserSyncReqDTO reqDTO); |
| | | |
| | | /** |
| | | * 通过用户 ID 查询用户 |
| | | * |
| | | * @param id 用户ID |