package com.xxfc.platform.universal.mapper;

import com.github.wxiaoqi.security.common.mapper.MysqlMapper;
import com.xxfc.platform.universal.entity.MemberFamilyInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

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