#
Junjie
2 天以前 be1cd9e5b30097ca427a9c2b7b054b28854e410a
src/main/resources/mapper/UserMapper.xml
@@ -9,10 +9,53 @@
        <result column="username" property="username" />
        <result column="mobile" property="mobile" />
        <result column="password" property="password" />
        <result column="mfa_allow" property="mfaAllow" />
        <result column="mfa_enabled" property="mfaEnabled" />
        <result column="mfa_bound_time" property="mfaBoundTime" />
        <result column="role_id" property="roleId" />
        <result column="create_time" property="createTime" />
        <result column="status" property="status" />
    </resultMap>
    <resultMap id="MfaResultMap" type="com.zy.system.entity.User" extends="BaseResultMap">
        <result column="mfa_secret" property="mfaSecret" />
    </resultMap>
    <select id="selectByMobileWithMfa" resultMap="MfaResultMap">
        select
            id,
            host_id,
            username,
            mobile,
            password,
            mfa_allow,
            mfa_enabled,
            mfa_secret,
            mfa_bound_time,
            role_id,
            create_time,
            status
        from sys_user
        where mobile = #{mobile}
        limit 1
    </select>
    <select id="selectByIdWithMfa" resultMap="MfaResultMap">
        select
            id,
            host_id,
            username,
            mobile,
            password,
            mfa_allow,
            mfa_enabled,
            mfa_secret,
            mfa_bound_time,
            role_id,
            create_time,
            status
        from sys_user
        where id = #{id}
        limit 1
    </select>
</mapper>