package com.sptg.estate.biz.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.sptg.common.core.beans.PageBean;
import com.sptg.common.core.beans.ResultBean;
import com.sptg.estate.api.dto.ApplyUserDto;
import com.sptg.estate.api.entity.ApplyUser;

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

/**
 * title: ApplyUserInterface
 * package: com.sptg.estate.biz.security
 * description: 住户认证申请-业务层接口
 *
 *               
 *               
 */
public interface
ApplyUserInterface extends IService<ApplyUser> {
    /**
     * 功能描述: 检测同一个房间下，同一个名字只能有一条待审核申请记录
     * @param applyUser
     * @return  ResultBean<Boolean>
     *               
     *                      
     */
    ResultBean<Boolean> checkByNameAndRoomId(ApplyUser applyUser);
    /**
     * 功能描述: 会员认证住户申请
     * @param applyUser
     * @return ResultBean<Boolean>
     *               
     *                      
     */
    ResultBean<Boolean> authentication(ApplyUser applyUser);
    /**
     * 功能描述: 获取住户认证列表
     * @param applyUserDto
     * @return Page<ApplyUser>
     *               
     *                      
     */
    Page<ApplyUser> showApplyUserList(ApplyUserDto applyUserDto);

    /**
     * 功能描述: 根据id查询
     * @param id
     * @return ApplyUser
     *               
     *                      
     */
    ApplyUser getApplyUserById(Long id);

    /**
     * 功能描述: 审核
     * @param applyUser
     * @return ApplyUser
     *               
     *                      
     */
    ResultBean<Boolean> updateCheckState(ApplyUser applyUser);
    /**
     * 功能描述: 查询会员申请的认证列表
     * @param applyUserDto
     * @return ApplyUser
     *               
     *                      
     */
    List<ApplyUser> getAllApplyUserByMemberId(ApplyUserDto applyUserDto);

    /**
     * 功能描述: 查询会员申请的认证列表-分页
     * @param applyUserDto
     * @return ApplyUser
     *
     *
     */
    Page<ApplyUser> pagingByMemberId(ApplyUserDto applyUserDto);

    /**
     * 功能描述: 通过房间ID查询会员申请的认证列表-分页
     * @param applyUserDto
     * @return ApplyUser
     *
     *
     */
    Page<ApplyUser> pagingByRoomId(ApplyUserDto applyUserDto);
	/**
     * 功能描述:查询不同审核状态的数量
     * @param applyUserDto
     * @return Map<String,Object>
     *
     *
     */

    Map<String,Object> applyUserCountForCheckState(ApplyUserDto applyUserDto);

    /**
     * 功能描述:认证用户数量
     * @param applyUserDto
     * {
     *     checkState 审核状态
     *     orgPosition 机构位置
     * }
     * @return Long
     *                
     *                      
     */
    Long getApplyUserCount(ApplyUserDto applyUserDto);

    /**
     * 功能描述:获取小区内待审核会员数量
     * @param applyUserDto {
     *       residentialId ：小区Id必填
     *       checkState:状态
     * }
     * @return int
     *             
     *                      
     */
    int getApplyUserCountByState(ApplyUserDto applyUserDto);

    /**
     * 功能描述:分页获取小区待审核会员
     * @param pageBean 查询条件
     * @return ResultBean<Page>
     *             
     *                      
     */
    ResultBean<Page> getApplyUserPage(PageBean<ApplyUser, ApplyUserDto> pageBean);

    List<ApplyUser> getAllApplyUserByRoomId(ApplyUserDto applyUserDto);

    List<ApplyUser> getApplyUserByCondition(ApplyUserDto applyUserDto);

    Long addApplyUserReturnUser(ApplyUser applyUser);

    ResultBean<Page<ApplyUser>> getAuthRoomByMemberId(ApplyUserDto applyUserDto);

    ResultBean<Boolean> addApplyUsers(List<ApplyUser> applyUserList);

    boolean deleteApplyUser(ApplyUserDto applyUserDto);
}
