blob: ad2c91d49452d6c74776723948e9e6387185fb33 [file] [log] [blame]
<?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.ruoyi.authentication.mapper.SysUserInviteMapper">
<resultMap id="SysUserInviteMap" type="com.ruoyi.authentication.domain.SysUserInvite">
<id property="codeId" column="code_id"/>
<result property="code" column="code"/>
<result property="userId" column="user_id"/>
</resultMap>
<select id="selectInviteByUserId" resultMap="SysUserInviteMap">
select code_id, code, user_id
from invite_codes
where user_id = #{userId}
</select>
<select id="selectInviteByCode" resultMap="SysUserInviteMap">
select code_id, code, user_id
from invite_codes
where code = #{code}
</select>
</mapper>