|
@@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="isDel" column="is_del" />
|
|
|
+ <result property="sort" column="sort" />
|
|
|
|
|
|
<result property="num" column="num" />
|
|
|
</resultMap>
|
|
@@ -35,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<sql id="selectQianshanGridVo">
|
|
|
select id, grid_name, grid_member, grid_phone, grid_level, parent_grid_id,parent_grid_name, region_id, region,
|
|
|
village_towns_id, village_towns, village_id, village, area_name, area_id, parent_area_id, create_by,
|
|
|
- create_time, update_by, update_time, is_del
|
|
|
+ create_time, update_by, update_time, is_del,sort
|
|
|
from qianshan_grid
|
|
|
</sql>
|
|
|
|
|
@@ -52,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="parentAreaId != null and parentAreaId != ''"> and parent_area_id = #{parentAreaId}</if>
|
|
|
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
|
|
</where>
|
|
|
- order by update_time
|
|
|
+ order by sort
|
|
|
</select>
|
|
|
|
|
|
<select id="selectQianshanGridById" parameterType="Long" resultMap="QianshanGridResult">
|
|
@@ -96,6 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="isDel != null">is_del,</if>
|
|
|
+ <if test="sort != null">sort,</if>
|
|
|
+
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">#{id},</if>
|
|
@@ -121,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="isDel != null">#{isDel},</if>
|
|
|
+ <if test="sort != null">#{sort},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -149,6 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="isDel != null">is_del = #{isDel},</if>
|
|
|
+ <if test="sort != null">sort = #{sort},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|