Prechádzať zdrojové kódy

动态表格添加复选框字段

xuezizhuo 2 rokov pred
rodič
commit
594916077e

+ 12 - 0
ruoyi-system/src/main/java/com/ruoyi/system/entity/DragTable.java

@@ -57,6 +57,9 @@ public class DragTable extends BaseEntity
     /** 逻辑删除 */
     private String delFlag;
 
+    /** 是否显示列表复选框(0:显示;1;不显示) */
+    private String isSelection;
+
     public void settId(Long tId) 
     {
         this.tId = tId;
@@ -157,6 +160,14 @@ public class DragTable extends BaseEntity
         return delFlag;
     }
 
+    public String getIsSelection() {
+        return isSelection;
+    }
+
+    public void setIsSelection(String isSelection) {
+        this.isSelection = isSelection;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -175,6 +186,7 @@ public class DragTable extends BaseEntity
             .append("createTime", getCreateTime())
             .append("updateBy", getUpdateBy())
             .append("updateTime", getUpdateTime())
+            .append("isSelection", getIsSelection())
             .toString();
     }
 }

+ 5 - 1
ruoyi-system/src/main/resources/mapper/dragmapper/DragTableMapper.xml

@@ -20,10 +20,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
+        <result property="isSelection"   column="is_selection"/>
     </resultMap>
 
     <sql id="selectDragTableVo">
-        select t_id, dt_name, dt_nickname, table_key, sql_key, dt_table_name, dt_notes, dt_column_name, spare, spare1, del_flag, create_by, create_time, update_by, update_time from drag_table
+        select t_id, dt_name, dt_nickname, table_key, sql_key, dt_table_name, dt_notes, dt_column_name, spare, spare1, del_flag, create_by, create_time, update_by, update_time, is_selection from drag_table
     </sql>
 
     <select id="selectDragTableList" parameterType="com.ruoyi.system.entity.DragTable" resultMap="DragTableResult">
@@ -63,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
+            <if test="isSelection != null">is_selection,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="dtName != null">#{dtName},</if>
@@ -79,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
+            <if test="isSelection != null">#{isSelection},</if>
          </trim>
     </insert>
 
@@ -99,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="isSelection != null">is_selection = #{isSelection},</if>
         </trim>
         where t_id = #{tId}
     </update>