package cn.com.countrygarden.bi.main.dao.manager.map;

import cn.com.countrygarden.bi.main.core.Mapper;
import cn.com.countrygarden.bi.main.dto.HouseKeeperDTO;
import cn.com.countrygarden.bi.main.dto.HouseKeeperNameTreeDTO;
import cn.com.countrygarden.bi.main.dto.HouseKeeperParamVo;
import cn.com.countrygarden.bi.main.model.manager.map.ManagerHousekeeperFollow;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 管家用户关注-数据层
 *
 * @author ÀîÉ­ÁÖ
 * @email www.justintoforest@gamail.com
 * @url www.yuhi.com.cn
 * @date 2018-06-29
 */
public interface ManagerHousekeeperFollowMapper extends Mapper<ManagerHousekeeperFollow>{

    List<HouseKeeperDTO> selectHouseKeeperFllow(@Param("organCodes")List<String> organCodes,
    											@Param("commNames")List<String> commNames,
									    		@Param("userCode") String userCode,
									    		@Param("phoneNum") String phoneNum,
									    		@Param("gardenDistricts") String gardenDistricts,
                                                @Param("userId")String userId);
    
    HouseKeeperDTO selectHouseKeeperFllowById(@Param("bid")Integer bid,
			@Param("hjid")String hjid,
			@Param("userCode")String userCode);
    
    
   List<HouseKeeperNameTreeDTO> selectHouseKeeperFollowName(@Param("userCode") String userCode);
   
   List<String> findPhoneNumByBid(@Param("userCode")String userCode);
   
   List<HouseKeeperNameTreeDTO> findPhoneNumTreeByBid(@Param("userCode")String userCode);
   
   List<String> selectOrganCode(@Param("userCode")String userCode);
   
   List<HouseKeeperNameTreeDTO> selectFollowGardenDistrictTree(@Param("userCode")String userCode);


    List<HouseKeeperDTO> selectByQuery(@Param("params") HouseKeeperParamVo houseKeeperParamVo,
                                       @Param("regions") List<String> regions,
                                       @Param("offset") Integer offset,
                                       @Param("size") Integer size);

    Integer countPageList(@Param("params") HouseKeeperParamVo houseKeeperParamVo,
                          @Param("regions") List<String> regions);
}