package com.agileboot.system.user.service;

import com.agileboot.common.mybatis.core.page.PageQuery;
import com.agileboot.common.satoken.pojo.LoginUser;
import com.agileboot.system.user.dto.*;
import com.agileboot.system.user.entity.SysUser;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface ISysUserService {
    LoginUser getUserInfo(String username);

    boolean registerUserInfo(SysUser sysUser);

    IPage<UserInfo> getUserList(SearchUserQuery dto);

    void addUser(AddUserCommand command);

    UserDetailDTO getUserDetailInfo(Long userId);

    void updateUser(UpdateUserCommand command);

    void resetUserPassword(ResetPasswordCommand command);

    void changeUserStatus(ChangeStatusCommand command);

    void deleteUsers(Set<Long> longs);

    Page<SysUser> getUserListByRole(PageQuery<?> query);

    boolean isAssignedToUsers(Long roleId);

    List<SysUser> assignedToUsersByRoleIds(List<Long> collect);

    void updateBatchRoleId(Long roleId, List<Long> userIds);

    void deleteBatchRoleId(List<Long> userIds);

    void checkDeptAssignedToUsers(Long deptId);

    void checkAnyPostIsAssignedToUser(List<Long> ids);

    Map<Long, String> geIdNameByIds(Set<Long> userIds);

    void resetUserPasswordByAdmin(ResetPasswordCommand command);
}
