package tech.glinfo.enbao.modules.sh.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import tech.glinfo.enbao.modules.sh.entity.ShFamilyMemberEntity;

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

/**
 * @author lyt
 * @date 2022/1/5 10:50
 */
@Mapper
public interface OtherShFamilyMemberDao extends BaseMapper<ShFamilyMemberEntity> {


    @Select("<script>" +
            "SELECT a.id, b.name, c.nickname FROM sh_family_member a ,sh_family b, app_user c WHERE a.family_id = b.id AND a.invite_id = c.id AND a.status = 1 AND a.user_id = ${userId}" +
            " </script>")
    List<Map<String, Object>> list(Integer userId);

}
