User.xml 540 B

1234567891011121314151617
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.bofeng.dao.UserMapper">
  4. <update id="updatePassword">
  5. update sys_user set
  6. login_pwd=#{newPassword}
  7. where
  8. user_id=#{userId} and login_pwd = #{password}
  9. </update>
  10. <select id="checkLoginName" resultType="integer">
  11. select count(*) from sys_user u where u.user_id!=#{userId} and u.login_name=#{loginName}
  12. </select>
  13. </mapper>