mappers.DefaultUserMapper.xml Maven / Gradle / Ivy
<?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>