Browse Source

网格信息加排序

LIVE_YE 3 years ago
parent
commit
bcdb202854

+ 12 - 0
boman-api/boman-domain/src/main/java/com/boman/domain/QianshanGrid.java

@@ -88,6 +88,9 @@ public class QianshanGrid extends BaseEntity
     /** 是否删除 */
     private String isDel;
 
+    /** 排序 */
+    private String sort;
+
     private Integer num;
 
     private boolean hasChildren = Boolean.TRUE;
@@ -95,6 +98,14 @@ public class QianshanGrid extends BaseEntity
     /** 子部门 */
     private List<SysDept> children = new ArrayList<SysDept>();
 
+    public void setSort(String sort) {
+        this.sort = sort;
+    }
+
+    public String getSort() {
+        return sort;
+    }
+
     public void setChildren(List<SysDept> children) {
         this.children = children;
     }
@@ -289,6 +300,7 @@ public class QianshanGrid extends BaseEntity
                 ", areaId='" + areaId + '\'' +
                 ", parentAreaId='" + parentAreaId + '\'' +
                 ", isDel='" + isDel + '\'' +
+                ", sort='" + sort + '\'' +
                 ", num=" + num +
                 ", hasChildren=" + hasChildren +
                 ", children=" + children +

+ 7 - 2
boman-web-core/src/main/resources/mapper/QianshanGridMapper.xml

@@ -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>