|
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.iformall.mapper.ApiMenuMapper">
-
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.ApiMenu">
- <id property="id" column="id" jdbcType="BIGINT"/>
- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
- <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
- <result property="name" column="name" jdbcType="VARCHAR"/>
- <result property="parentId" column="parent_id" jdbcType="BIGINT"/>
- <result property="status" column="status" jdbcType="TINYINT"/>
- <result property="leafFlag" column="leaf_flag" jdbcType="TINYINT"/>
- <result property="deleteFlag" column="delete_flag" jdbcType="TINYINT"/>
- </resultMap>
-
- <sql id="Base_Column_List">
- id,create_time,update_time,
- name,parent_id,status,
- leaf_flag,delete_flag
- </sql>
-
- <sql id="dynamicWhereConditions">
- WHERE 1 = 1
- <if test=" null != id ">
- and `id` = #{id}
- </if>
- <if test=" null != parentId and '' != parentId ">
- and `parent_id` = #{parentId}
- </if>
- <if test=" null != name and '' != name ">
- and `name` = #{name}
- </if>
- <if test=" null != status ">
- and `status = #{status}
- </if>
- </sql>
-
- <select id="listApiMenu" resultType="com.iformall.domain.po.sm.ApiMenu">
- SELECT
- <include refid="Base_Column_List"/>
- FROM api_menu
- <include refid="dynamicWhereConditions"/>
- </select>
- </mapper>
|