package com.diagbot.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.diagbot.dto.AuthenticationDTO;
import com.diagbot.dto.CustomerDTO;
import com.diagbot.dto.OrganizationDTO;
import com.diagbot.dto.UserAllDTO;
import com.diagbot.dto.UserInfoDTO;
import com.diagbot.dto.UserOrgDTO;
import com.diagbot.dto.UserOrgizationProductDTO;
import com.diagbot.entity.User;

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

import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author gaodm
 * @since 2018-08-02
 */
public interface UserService extends IService<User> {

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

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

    public IPage<UserInfoDTO> selectUserInfoListPage(Page page, UserInfoDTO userInfo);

    public boolean updateUserInfoAll(Map<String, Object> userMap);

    boolean updateDeleted(Map<String, Object> map);

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

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

    public List<UserOrgDTO> getUserOrgByIds(List<Long> userIds);

    public boolean auditUserInfoAll(Map<String, Object> auditMap);

    public List<UserInfoDTO> dependentuserInfoByTime(Map<String, Object> map);

    public List<User> getUserByOrgName(String orgName);
    
    public IPage<UserAllDTO> queryUserInformation(Page page, CustomerDTO userInfo);
    
    public IPage<OrganizationDTO> queryMechanismInformation(Page page,  CustomerDTO userInfo);
    
    public IPage<UserOrgizationProductDTO> queryVerifiedUserOrganizationProduct(Page page, CustomerDTO userInfo);
    
    public IPage<AuthenticationDTO> queryAuthentication(Page page,  CustomerDTO userInfo);

    public boolean updateUserInfo (Map<String, Object> amendUserInfo);
    
    public boolean updateOrganizations (Map<String, Object> amendOrg);
    
    public List<UserInfoDTO> exportOrganizations(Map<String, Object> map);
}
