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.

56 lines
1.9 KiB

8 months ago
8 months 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.coin.AdminMapper">
  4. <select id="getAdmin" resultType="com.example.demo.domain.entity.Admin">
  5. select
  6. id as id,
  7. admin_name as adminName,
  8. account as account,
  9. password as password,
  10. machine_id as machineId,
  11. admin_status as adminStatus,
  12. market as markets,
  13. market as marketName,
  14. postiton as postiton,
  15. remark as remark,
  16. create_time as createTime,
  17. update_time as updateTime,
  18. role_id as roleId
  19. from admin
  20. where account=#{account}
  21. </select>
  22. <select id="selectByName" resultType="com.example.demo.domain.entity.Admin">
  23. select id as id,
  24. admin_name as adminName,
  25. account as account,
  26. password as password,
  27. machine_id as machineId,
  28. admin_status as adminStatus,
  29. market as markets,
  30. market as marketName,
  31. postiton as postiton,
  32. remark as remark,
  33. create_time as createTime,
  34. update_time as updateTime,
  35. role_id as roleId
  36. from admin
  37. where account= #{account}
  38. </select>
  39. <select id="getId" resultType="java.lang.Integer">
  40. select id from admin
  41. where account=#{account}
  42. </select>
  43. <!--更新用户密码-->
  44. <update id="updatePassword">
  45. update admin
  46. set password = #{password},
  47. update_time = #{updateTime}
  48. where account = #{account}
  49. </update>
  50. <select id="getName" resultType="java.lang.String">
  51. select admin_name from admin
  52. where account= #{account}
  53. </select>
  54. </mapper>