|
@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<resultMap type="GridInfo" id="GridInfoResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="areaName" column="area_name" />
|
|
|
+ <result property="pid" column="pid" />
|
|
|
<result property="gridName" column="grid_name" />
|
|
|
<result property="sort" column="sort" />
|
|
|
<result property="type" column="type" />
|
|
@@ -18,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectGridInfoVo">
|
|
|
- select id, area_name, grid_name, sort, type, create_by, create_time, update_by, update_time, is_del from grid_info
|
|
|
+ select id, area_name, pid,grid_name, sort, type, create_by, create_time, update_by, update_time, is_del from grid_info
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectGridInfoList" parameterType="GridInfo" resultMap="GridInfoResult">
|
|
@@ -27,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
|
|
<if test="gridName != null and gridName != ''"> and grid_name like concat('%', #{gridName}, '%')</if>
|
|
|
<if test="sort != null and sort != ''"> and sort = #{sort}</if>
|
|
|
+ <if test="pid != null and pid != ''"> and pid = #{pid}</if>
|
|
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
|
|
</where>
|
|
@@ -41,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
insert into grid_info
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="areaName != null and areaName != ''">area_name,</if>
|
|
|
+ <if test="pid != null and pid != ''">pid,</if>
|
|
|
<if test="gridName != null and gridName != ''">grid_name,</if>
|
|
|
<if test="sort != null and sort != ''">sort,</if>
|
|
|
<if test="type != null">type,</if>
|
|
@@ -52,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="areaName != null and areaName != ''">#{areaName},</if>
|
|
|
+ <if test="pid != null and pid != ''">#{pid},</if>
|
|
|
<if test="gridName != null and gridName != ''">#{gridName},</if>
|
|
|
<if test="sort != null and sort != ''">#{sort},</if>
|
|
|
<if test="type != null">#{type},</if>
|
|
@@ -67,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
update grid_info
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="areaName != null and areaName != ''">area_name = #{areaName},</if>
|
|
|
+ <if test="pid != null and pid != ''">pid = #{pid},</if>
|
|
|
<if test="gridName != null and gridName != ''">grid_name = #{gridName},</if>
|
|
|
<if test="sort != null and sort != ''">sort = #{sort},</if>
|
|
|
<if test="type != null">type = #{type},</if>
|
|
@@ -91,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<select id="treeSelect" parameterType="GridInfo" resultMap="GridInfoResult">
|
|
|
- select id,area_name, grid_name, sort, type from grid_info
|
|
|
+ select id,area_name, grid_name, sort, type,pid from grid_info
|
|
|
<where>
|
|
|
is_del = 'N'
|
|
|
<if test="pid != null "> and pid =#{pid}</if>
|