Эх сурвалжийг харах

feat:添加上下按钮类型字段

韩帛霖 1 жил өмнө
parent
commit
b8696c91e5

+ 13 - 0
zkqy-business/src/main/java/com/zkqy/business/entity/DragTableBtn.java

@@ -36,6 +36,11 @@ public class DragTableBtn extends BaseEntity {
      */
     private String btnKey;
 
+    /**
+     * 按钮组类型
+     */
+    private String btnGroupType;
+
     /**
      * 按钮组名称
      */
@@ -278,6 +283,14 @@ public class DragTableBtn extends BaseEntity {
         this.btnFormType = btnFormType;
     }
 
+    public String getBtnGroupType() {
+        return btnGroupType;
+    }
+
+    public void setBtnGroupType(String btnGroupType) {
+        this.btnGroupType = btnGroupType;
+    }
+
     @Override
     public String toString() {
         final StringBuilder sb = new StringBuilder("DragTableBtn{");

+ 66 - 33
zkqy-business/src/main/resources/mapper/dragmapper/DragTableBtnMapper.xml

@@ -1,42 +1,70 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.zkqy.business.mapper.DragTableBtnMapper">
-    
+
     <resultMap type="com.zkqy.business.entity.DragTableBtn" id="DragTableBtnResult">
-        <result property="id"    column="id"    />
-        <result property="btnParentId"    column="btn_parent_id"    />
-        <result property="btnKey"    column="btn_key"    />
+        <result property="id" column="id"/>
+        <result property="btnParentId" column="btn_parent_id"/>
+        <result property="btnKey" column="btn_key"/>
+        <result property="btnGroupType" column="btn_group_type"/>
         <result property="ancestorsId" column="ancestors_id"/>
         <result property="btnGroupName" column="btn_group_name"/>
-        <result property="btnName"    column="btn_name"    />
-        <result property="btnType"    column="btn_type"    />
+        <result property="btnName" column="btn_name"/>
+        <result property="btnType" column="btn_type"/>
         <result property="btnIcon" column="btn_icon"/>
-        <result property="btnFormKey"    column="btn_form_key"    />
-        <result property="btnFormType"    column="btn_form_type"    />
-        <result property="btnProcessKey"    column="btn_process_key"    />
-        <result property="btnTableKey"    column="btn_table_key"    />
-        <result property="btnScriptKey"    column="btn_script_key"    />
-        <result property="btnShowCondition"    column="btn_show_condition"    />
-        <result property="btnParams"    column="btn_params"    />
-        <result property="btnHasPermi"    column="btn_has_permi"    />
-        <result property="btnSort"    column="btn_sort"    />
-        <result property="delFlag"    column="del_flag"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createById"    column="create_by_id"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateById"    column="update_by_id"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="remark"    column="remark"    />
+        <result property="btnFormKey" column="btn_form_key"/>
+        <result property="btnFormType" column="btn_form_type"/>
+        <result property="btnProcessKey" column="btn_process_key"/>
+        <result property="btnTableKey" column="btn_table_key"/>
+        <result property="btnScriptKey" column="btn_script_key"/>
+        <result property="btnShowCondition" column="btn_show_condition"/>
+        <result property="btnParams" column="btn_params"/>
+        <result property="btnHasPermi" column="btn_has_permi"/>
+        <result property="btnSort" column="btn_sort"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createById" column="create_by_id"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateById" column="update_by_id"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
     </resultMap>
 
     <sql id="selectDragTableBtnVo">
-        select id, btn_parent_id,ancestors_id, btn_key,btn_group_name, btn_name, btn_type,btn_icon, btn_form_key,btn_form_type, btn_process_key, btn_table_key, btn_script_key, btn_show_condition, btn_params, btn_has_permi, btn_sort, del_flag, create_by, create_by_id, create_time, update_by, update_by_id, update_time, remark from {DBNAME}.drag_table_btn
+        select id,
+               btn_parent_id,
+               ancestors_id,
+               btn_key,
+               btn_group_type,
+               btn_group_name,
+               btn_name,
+               btn_type,
+               btn_icon,
+               btn_form_key,
+               btn_form_type,
+               btn_process_key,
+               btn_table_key,
+               btn_script_key,
+               btn_show_condition,
+               btn_params,
+               btn_has_permi,
+               btn_sort,
+               del_flag,
+               create_by,
+               create_by_id,
+               create_time,
+               update_by,
+               update_by_id,
+               update_time,
+               remark
+        from {DBNAME}.drag_table_btn
     </sql>
 
-    <select id="selectDragTableBtnList" parameterType="com.zkqy.business.entity.DragTableBtn" resultMap="DragTableBtnResult">
+    <select id="selectDragTableBtnList" parameterType="com.zkqy.business.entity.DragTableBtn"
+            resultMap="DragTableBtnResult">
         <include refid="selectDragTableBtnVo"/>
         where del_flag = '0'
         <if test="btnParentId != null ">and btn_parent_id = #{btnParentId}</if>
@@ -60,12 +88,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="updateById != null ">and update_by_id = #{updateById}</if>
         order by btn_sort asc
     </select>
-    
+
     <select id="selectDragTableBtnById" parameterType="Long" resultMap="DragTableBtnResult">
         <include refid="selectDragTableBtnVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertDragTableBtn" parameterType="com.zkqy.business.entity.DragTableBtn">
         insert into drag_table_btn
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -90,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time,</if>
             <if test="remark != null">remark,</if>
             del_flag
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="btnParentId != null">#{btnParentId},</if>
             <if test="btnKey != null">#{btnKey},</if>
@@ -113,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="remark != null">#{remark},</if>
             '0'
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateDragTableBtn" parameterType="com.zkqy.business.entity.DragTableBtn">
@@ -144,7 +172,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <update id="deleteDragTableBtnById" parameterType="Long">
-        update drag_table_btn set del_flag = '2' where id = #{id}
+        update drag_table_btn
+        set del_flag = '2'
+        where id = #{id}
     </update>
 
     <update id="batchDeleteDragTableBtnByBtnKeys" parameterType="String">
@@ -172,7 +202,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="hasChildByBtnId" resultType="Integer">
-        select count(1) from drag_table_btn where btn_parent_id = #{btnId} and del_flag = '0'
+        select count(1)
+        from drag_table_btn
+        where btn_parent_id = #{btnId}
+          and del_flag = '0'
     </select>
 
     <select id="selectDragTableBtnByBtnKey" parameterType="String" resultMap="DragTableBtnResult">