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.dto.manager.ManagerKeeperDTO;
import cn.com.countrygarden.bi.main.model.manager.map.ManagerHousekeeperCache;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 管家列表数据缓存-数据层
 *
 * @author 李森林
 * @email www.justintoforest@gamail.com
 * @url 
 * @date 2018-11-19
 */
public interface ManagerHousekeeperCacheMapper extends Mapper<ManagerHousekeeperCache>{

    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);

    Integer countPageListByUser(@Param("params") HouseKeeperParamVo houseKeeperParamVo,
                                @Param("commsName") List<String> commsName);

    List<ManagerKeeperDTO> selectByKeeper(@Param("organCode") String organCode, @Param("commId") String commId);

    Integer countHousekeeperByOrgan(@Param("organName") String organName);

    List<HouseKeeperNameTreeDTO> findALLPhoneNum(@Param("phone") String phone, @Param("regionName") String regionName);

    Integer updateCommByProjectName(@Param("projectName") String projectName,
                                    @Param("commName") String commName,
                                    @Param("commCode") String commCode,
                                    @Param("developmentsubject") String developmentsubject);

    Integer updateCommByCommName(@Param("commName") String commName);

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


}