You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1006 B

1 month ago
1 month ago
  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.example.demo.mapper.AdminMapper">
  4. <select id="getAdmin" resultType="com.example.demo.domain.entity.Admin">
  5. select * from admin
  6. where account=#{account}
  7. </select>
  8. <select id="selectByName" resultType="com.example.demo.domain.entity.Admin">
  9. select * from admin
  10. where account= #{account}
  11. </select>
  12. <select id="getId" resultType="java.lang.Integer">
  13. select id from admin
  14. where account=#{account}
  15. </select>
  16. <!--更新用户密码-->
  17. <update id="updatePassword">
  18. update admin
  19. set password = #{password},
  20. update_time = #{updateTime}
  21. where account = #{account}
  22. </update>
  23. <select id="getName" resultType="java.lang.String">
  24. select admin_name from admin
  25. where account= #{account}
  26. </select>
  27. </mapper>