package com.xxfc.member.mapper;

import com.github.wxiaoqi.security.common.mapper.MysqlMapper;
import com.xxfc.member.entity.MemberFamilyInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.special.InsertListMapper;

import java.util.List;

public interface MemberFamilyInfoMapper
        extends MysqlMapper<MemberFamilyInfo> {

    @Delete("delete from member_family_info where member_id = #{id}")
    int deleteByMemberId(Integer id);

    @Select("select * from member_family_info where member_id = #{id}")
    List<MemberFamilyInfo> selectByMemberId(Integer id);

    int deleteByMemberIdNotInIds(@Param("memberId") Integer memberId, @Param("ids") List<Integer> ids);
}