All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mappers.DefaultUserMapper.xml Maven / Gradle / Ivy

There is a newer version: 3.0.6
Show newest version
<?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.lframework.starter.mybatis.mappers.DefaultUserMapper">

    <update id="updatePassword">
        UPDATE sys_user
        SET password = #{password}
        WHERE id = #{userId}
    </update>

    <update id="updateEmail">
        UPDATE sys_user
        SET email = #{email}
        WHERE id = #{userId}
    </update>

    <update id="updateTelephone">
        UPDATE sys_user
        SET telephone = #{telephone}
        WHERE id = #{userId}
    </update>
    <update id="lockById">
        UPDATE sys_user
        SET lock_status = TRUE
        WHERE id = #{id}
    </update>
    <update id="unlockById">
        UPDATE sys_user
        SET lock_status = FALSE
        WHERE id = #{id}
    </update>

    <select id="getInfo" resultType="com.lframework.starter.web.dto.UserInfoDto">
        SELECT
            id, username, code, name, email, telephone, gender
        FROM sys_user
        WHERE id = #{userId}
    </select>

    <select id="findById" resultType="com.lframework.starter.web.dto.UserDto">
        SELECT id, name
        FROM sys_user
        WHERE id = #{id}
    </select>
</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy