package com.bootdo.system.service;

import com.bootdo.common.domain.Tree;
import com.bootdo.system.domain.DeptDO;
import com.bootdo.system.domain.UserDO;
import com.bootdo.system.vo.UserVO;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

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

@Service
public interface UserService {
    UserDO get(Long id);

    List<UserDO> list(Map<String, Object> map);

    int count(Map<String, Object> map);

    int save(UserDO user);

	int update(UserDO user);

	int remove(Long userId);

	int batchremove(Long[] userIds);

	boolean exit(Map<String, Object> params);

	Set<String> listRoles(Long userId);

	int resetPwd(UserVO userVO,UserDO userDO) throws Exception;
	int adminResetPwd(UserVO userVO) throws Exception;
	Tree<DeptDO> getTree();

	/**
	 * 更新个人信息
	 * @param userDO
	 * @return
	 */
    int updatePersonal(UserDO userDO);

    /**
     * 更新个人图片
     *
     * @param file        图片
     * @param avatar_data 裁剪信息
     * @param userId      用户ID
     * @throws Exception
     */
    Map<String, Object> updatePersonalImg(MultipartFile file, String avatar_data, Long userId) throws Exception;

    /**
     * 保存第三方接口推送的用户
     *
     * @param isAll
     * @param userDOS
     */
    void batchUpdateThirdPartUser(List<UserDO> userDOS);

    /**
     * 根据第三方标志和用户名称获取用户
     *
     * @param username
     * @return
     */
    UserDO getByHobbyAndUserName(String username);

	List<Integer> getCurrUserSysList(Long userId);
}
