RoleDao.xml 870 B

1234567891011121314151617181920212223242526
  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.zglc.kg.dao.RoleDao">
  4. <!-- 可根据自己的需求,是否要使用 -->
  5. <resultMap type="com.zglc.kg.entity.RoleEntity" id="roleMap">
  6. <result property="id" column="id"/>
  7. <result property="roleName" column="role_name"/>
  8. <result property="rights" column="rights"/>
  9. <result property="remark" column="remark"/>
  10. </resultMap>
  11. <select id="listAll" resultMap="roleMap">
  12. select id,role_name,rights,remark
  13. from t_role
  14. where id > 1
  15. </select>
  16. <!-- <select id="selectAll" resultMap="roleMap">-->
  17. <!-- select id,role_name,rights,remark-->
  18. <!-- from t_role-->
  19. <!-- where id > 1-->
  20. <!-- </select>-->
  21. </mapper>