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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.huiju.estateagents.center.taUser.entity.TaTags;
import com.huiju.estateagents.center.taUser.entity.TaUser;
import com.huiju.estateagents.entity.TaPersonBuilding;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 用户表  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-09-11
 */
@Mapper
public interface TaUserMapper extends BaseMapper<TaUser> {
	
	List<Map<String,Object>> getPageList(IPage<TaUser> pg, @Param("channelId") Integer channelId, @Param("miniAppName") String miniAppName);
	
	List<TaTags> getTagsList(@Param("userId") Integer userId,@Param("orgId") Integer orgId);
	
	List<TaUser> getUserList(@Param("phone") String phone,@Param("orgId") Integer orgId);

    IPage<TaUser> seleUserList(IPage pg,@Param("taUser") TaUser taUser,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);

    Integer validateWeight(@Param("buildingIds") List<String> buildingIds, @Param("buildingId") String buildingId, @Param("weight") String weight, @Param("userId")Integer userId);

    TaUser getAdminByAppID(@Param("appid") String appID);

    List<String> getBuildingIdsOf(@Param("userId") Integer userId,@Param("buildingId") String buildingId);

    TaUser getUserByPerson(@Param("orgId") Integer orgId, @Param("personId") String personId);
}
