后台服务
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.7 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.iformall.mapper.ApiMenuMapper">
  6. <resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.ApiMenu">
  7. <id property="id" column="id" jdbcType="BIGINT"/>
  8. <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
  9. <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
  10. <result property="name" column="name" jdbcType="VARCHAR"/>
  11. <result property="parentId" column="parent_id" jdbcType="BIGINT"/>
  12. <result property="status" column="status" jdbcType="TINYINT"/>
  13. <result property="leafFlag" column="leaf_flag" jdbcType="TINYINT"/>
  14. <result property="deleteFlag" column="delete_flag" jdbcType="TINYINT"/>
  15. </resultMap>
  16. <sql id="Base_Column_List">
  17. id,create_time,update_time,
  18. name,parent_id,status,
  19. leaf_flag,delete_flag
  20. </sql>
  21. <sql id="dynamicWhereConditions">
  22. WHERE 1 = 1
  23. <if test=" null != id ">
  24. and `id` = #{id}
  25. </if>
  26. <if test=" null != parentId and '' != parentId ">
  27. and `parent_id` = #{parentId}
  28. </if>
  29. <if test=" null != name and '' != name ">
  30. and `name` = #{name}
  31. </if>
  32. <if test=" null != status ">
  33. and `status = #{status}
  34. </if>
  35. </sql>
  36. <select id="listApiMenu" resultType="com.iformall.domain.po.sm.ApiMenu">
  37. SELECT
  38. <include refid="Base_Column_List"/>
  39. FROM api_menu
  40. <include refid="dynamicWhereConditions"/>
  41. </select>
  42. </mapper>