<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.miaxis.spread.mapper.WxSpreadRelationMapper">
<select id="getWxSpreadRelationList" resultType="com.miaxis.common.core.domain.entity.UserInfo">
select * from user_info where openid in (
select t1.parent_openid
 FROM wx_spread_relation  t1 left join user_info  t2 on (t1.parent_openid = t2.openid) where
FIND_IN_SET(t1.openid,getParents(#{openid})))
</select>


</mapper>
