package com.huiju.estateagents.center.taUser.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huiju.estateagents.base.ResponseBean;
import com.huiju.estateagents.center.taUser.entity.TaTags;
import com.huiju.estateagents.center.taUser.entity.TaUser;
import com.huiju.estateagents.entity.TaPersonBuilding;

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

/**
 * <p>
 * 用户表  服务类
 * </p>
 *
 * @author jobob
 * @since 2019-09-11
 */
public interface ITaUserService extends IService<TaUser> {

    IPage<Map<String, Object>> getPageList(IPage<TaUser> pg, Integer channelId, String miniAppName);

    TaUser newUserAndOrg(TaUser taUser, Integer channelId) throws Exception;

    TaUser getInfoWithOrg(Integer id);

    void updateInfoWithOrg(TaUser taUser) throws Exception;

    void turnUserOnOrNot(Integer id, boolean isOn, String plat) throws Exception;

    void resetPassword(Integer id, String newPass) throws Exception;

    List<TaTags> getTagsList(TaUser e);

    TaUser addAdminUser(TaUser taUser) throws Exception;

    TaUser updateAdminUser(TaUser taUser) throws Exception;

    TaUser getAdminByAppID(String appid);

    /**
     * 查询所有城市
     *
     * @return
     */
    ResponseBean cityTree();

    /**
     * 员工离职
     *
     * @param userId
     * @param customerIdList
     * @param consultantUserId 置业顾问的userId
     * @return
     */
    ResponseBean departureUser(Integer userId, List<String> customerIdList, Integer consultantUserId);

    /**
     * 分页查询用户列表
     *
     * @param pg
     * @param taUser
     * @param taPersonBuildingListByUserId
     * @return
     */
    IPage<TaUser> seleUserList(IPage pg, TaUser taUser, List<TaPersonBuilding> taPersonBuildingListByUserId);

    /**
     * 获取用户信息
     *
     * @param userId
     * @param orgId
     * @return
     */
    TaUser getUserInfoById(Integer userId, Integer orgId);
}
