package com.diagbot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.diagbot.dto.UserInfoDTO;
import com.diagbot.dto.UserInfoExportDTO;
import com.diagbot.dto.UserOrgDTO;
import com.diagbot.entity.User;
import com.diagbot.vo.UserExportVO;
import com.diagbot.vo.UserInfoOrganizationsVO;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gaodm
 * @since 2018-08-02
 */
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据用户查找信息
     * @param username 用户名
     * @return 用户信息
     */
    User findByName(String username);

    /**
     * 根据用户id获取用户信息(示例)
     * @param page 翻页信息
     * @param user 用户输入信息
     * @return 翻页用户信息
     */
    IPage<User> selectUserListPage(Page page, @Param("user") User user);

    IPage<User> indexPage(Page page, @Param("user") User user);

    IPage<UserInfoDTO> selectUserInfoListPage(Page page,@Param("userInfo") UserInfoDTO userInfo);
    
    public boolean updateUserInfoAll(@Param("userMap") Map<String, Object> userMap);
    
    public boolean updateDeleted(@Param("map") Map<String,Object> map);

    public List<User> getByIds(List<Long> ids);

    public List<UserOrgDTO> getUserOrgDTOByIds(List<Long> ids);
    
    public boolean auditUserInfoAll(@Param("auditMap") Map<String,Object> auditMap);
    
    public Integer updateById(Map<String,String> map);
    
    public List<UserInfoExportDTO> dependentuserInfoByTime(@Param("userExport") Map<String,Object> map);

    public List<User> getUserByOrgName(String orgName);

}
