瀏覽代碼

动态表格添加时间格式

xuezizhuo 1 年之前
父節點
當前提交
340a902908

+ 14 - 1
ruoyi-system/src/main/java/com/ruoyi/system/entity/DragTable.java

@@ -46,6 +46,10 @@ public class DragTable extends BaseEntity
     @Excel(name = "列字段标题名称")
     private String dtColumnName;
 
+    /** 时间格式 */
+    @Excel(name = "时间格式")
+    private String timeFormat;
+
     /** 备用列 */
     @Excel(name = "备用列")
     private String spare;
@@ -137,7 +141,15 @@ public class DragTable extends BaseEntity
         this.spare = spare;
     }
 
-    public String getSpare() 
+    public String getTimeFormat() {
+        return timeFormat;
+    }
+
+    public void setTimeFormat(String timeFormat) {
+        this.timeFormat = timeFormat;
+    }
+
+    public String getSpare()
     {
         return spare;
     }
@@ -179,6 +191,7 @@ public class DragTable extends BaseEntity
             .append("dtTableName", getDtTableName())
             .append("dtNotes", getDtNotes())
             .append("dtColumnName", getDtColumnName())
+            .append("timeFormat",getTimeFormat())
             .append("spare", getSpare())
             .append("spare1", getSpare1())
             .append("delFlag", getDelFlag())

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

@@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="dtTableName"    column="dt_table_name"    />
         <result property="dtNotes"    column="dt_notes"    />
         <result property="dtColumnName"    column="dt_column_name"    />
+        <result property="timeFormat" column="time_format"/>
         <result property="spare"    column="spare"    />
         <result property="spare1"    column="spare1"    />
         <result property="delFlag"    column="del_flag"    />
@@ -24,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </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, is_selection from drag_table
+        select t_id, dt_name, dt_nickname, table_key, sql_key, dt_table_name,time_format, 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">
@@ -57,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="dtTableName != null">dt_table_name,</if>
             <if test="dtNotes != null">dt_notes,</if>
             <if test="dtColumnName != null">dt_column_name,</if>
+            <if test="timeFormat != null">time_format,</if>
             <if test="spare != null">spare,</if>
             <if test="spare1 != null">spare1,</if>
             <if test="delFlag != null">del_flag,</if>
@@ -74,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="dtTableName != null">#{dtTableName},</if>
             <if test="dtNotes != null">#{dtNotes},</if>
             <if test="dtColumnName != null">#{dtColumnName},</if>
+            <if test="timeFormat != null">#{timeFormat},</if>
             <if test="spare != null">#{spare},</if>
             <if test="spare1 != null">#{spare1},</if>
             <if test="delFlag != null">#{delFlag},</if>
@@ -95,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="dtTableName != null">dt_table_name = #{dtTableName},</if>
             <if test="dtNotes != null">dt_notes = #{dtNotes},</if>
             <if test="dtColumnName != null">dt_column_name = #{dtColumnName},</if>
+            <if test="timeFormat != null">time_format = #{timeFormat},</if>
             <if test="spare != null">spare = #{spare},</if>
             <if test="spare1 != null">spare1 = #{spare1},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>