package com.sptg.estate.biz.service;

import com.baomidou.mybatisplus.service.IService;
import com.sptg.common.core.beans.ResultBean;
import com.sptg.estate.api.entity.MemberAndUser;

import java.util.List;

/**
 * title: MemberAndUserInterface
 * package: com.sptg.estate.biz.security
 * description: 会员和用户  服务层接口类
 *
 *               
 *                
 */
public interface MemberAndUserInterface extends IService<MemberAndUser> {

    /**
     * 功能描述: 批量保存
     * @param
     * @return
     *               
     *                      
     */
    ResultBean<Boolean> addMemberAndUsers(List<MemberAndUser> list);

    /**
     * 功能描述: 根据条件查询会员与住户的关系
     * @param memberAndUser
     * @return List<MemberAndUser>
     *               
     *                      
     */
    List<MemberAndUser> getByCondition(MemberAndUser memberAndUser);

    /**
     * 功能描述: 检测会员和住户是否存在关系
     * @param memberAndUser
     * @return ResultBean<Boolean>
     *               
     *                      
     */
    ResultBean<Boolean> checkRelationship(MemberAndUser memberAndUser);

    /**
     * 功能描述: 统计记录
     * @param memberAndUser
     * @return int
     *               
     *                      
     */
    int countByCondition (MemberAndUser memberAndUser);

    /**
     * 根据会员ID获取会员住户关联数据
     *
     * @param memberId
     * @return
     */
    List<MemberAndUser> getListByMemberId(Long memberId);

    /**
     * 根据条件删除
     *
     * @param memberAndUser
     * @return
     */
    boolean deleteMemberAndUser(MemberAndUser memberAndUser);
}
