package com.zcxk.rmcp.web.service;

import com.zcxk.core.mysql.pageing.Pagination;
import com.zcxk.rmcp.api.dto.community.CommunityAddDto;
import com.zcxk.rmcp.api.dto.community.CommunityDto;
import com.zcxk.rmcp.api.dto.community.CommunityPageDto;
import com.zcxk.rmcp.api.vo.CommunityVo;
import com.zcxk.rmcp.core.entity.Community;

import java.util.List;

/**
 * 
 * @author linqingwei
 * @date 2021-07-19 9:45
 */
public interface CommunityService{

    /**
    * 添加小区
    * @author Andy
    * @date 14:50 2021/8/3
    * @param communityAddDto:
    * @return int
    **/
    int insertCommunity(CommunityAddDto communityAddDto);

    /**
    * 查询小区信息
    * @author Andy
    * @date 14:50 2021/8/3
    * @param id:
    * @return com.zcxk.rmcp.core.entity.Community
    **/
    Community findById(Integer id);

    /**
    * 更新小区信息
    * @author Andy
    * @date 14:50 2021/8/3
    * @param communityDto:
    * @return int
    **/
    int updateByPrimaryKeySelective(CommunityAddDto communityDto);

    /**
    * 删除小区
    * @author Andy
    * @date 14:50 2021/8/3
    * @param id:
    * @return void
    **/
    void deleteCommunity(Integer id);

    /**
    * 分页查询
    * @author Andy
    * @date 14:50 2021/8/3
    * @param communityDto:
    * @return com.zcxk.core.mysql.pageing.Pagination<com.zcxk.rmcp.api.vo.CommunityVo>
    **/
    Pagination<CommunityVo> pageCommunity(CommunityPageDto communityDto);

    /**
    * 查询集合
    * @author Andy
    * @date 14:51 2021/8/3
    * @param communityDto:
    * @return java.util.List<com.zcxk.rmcp.api.vo.CommunityVo>
    **/
    List<CommunityVo> listCommunity(CommunityDto communityDto);

    /**
    * 查询名字
    * @author Andy
    * @date 14:51 2021/8/3
    * @param tenantId:
    * @param communityName:
    * @return com.zcxk.rmcp.core.entity.Community
    **/
    Community findByName(String tenantId, String communityName);
}
