<?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="org.jeecg.modules.okki.siteuser.mapper.OkkiSiteUserMapper">

    <select id="getSiteUserInfoBySiteId" resultType="org.jeecg.modules.okki.siteuser.entity.OkkiSiteUser">
        SELECT t1.*,t2.name as nickname,t2.account,t2.id FROM `okki_site_user` t1 LEFT JOIN okki_account t2 on t1.user_id = t2.user_id
        where t1.site_id = #{siteId}
    </select>

    <select id="getSiteUserInfoByUserId" resultType="org.jeecg.modules.okki.siteuser.entity.OkkiSiteUser">
        SELECT t1.*,t2.name as nickname,t2.account,t2.id FROM `okki_site_user` t1 LEFT JOIN okki_account t2 on t1.user_id = t2.user_id
        where t1.user_id = #{userId}
    </select>

</mapper>