<?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.qianwen.mdc.mapper.MenuMapper">
|
<resultMap id="BaseResultMap" type="com.qianwen.mdc.domain.Menu">
|
<id column="id" jdbcType="INTEGER" property="id" />
|
<result column="label" jdbcType="VARCHAR" property="label" />
|
<result column="use_role" jdbcType="VARCHAR" property="useRole" />
|
<result column="params" jdbcType="VARCHAR" property="params" />
|
<result column="link_type" jdbcType="INTEGER" property="linkType" />
|
<result column="url" jdbcType="VARCHAR" property="url" />
|
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
|
<result column="order_num" jdbcType="INTEGER" property="orderNum" />
|
<result column="op_flag" jdbcType="VARCHAR" property="opFlag" />
|
|
</resultMap>
|
|
|
<select id="list" resultMap="BaseResultMap">
|
SELECT id,label,use_role,params,link_type,url,params,parent_id,op_flag
|
FROM menu
|
<where>
|
<if test="parentId != null">
|
|
and parent_id=#{parentId}
|
</if>
|
<if test="parentId == null">
|
|
and parent_id is null
|
</if>
|
</where>
|
order by order_num
|
</select>
|
</mapper>
|