Pārlūkot izejas kodu

三维建模添加字段

ywf 2 mēneši atpakaļ
vecāks
revīzija
e56dfc6f98

+ 11 - 0
onemap-modules/onemap-model/src/main/java/com/onemap/sanya/domain/Modeling3D.java

@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.onemap.common.core.annotation.Excel;
 import com.onemap.common.core.web.domain.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.util.Date;
 
 /**
  * 3D建模对象 t_fzss_fzxz_3d_modeling
@@ -28,4 +30,13 @@ public class Modeling3D {
     @Excel(name = "模型数据")
     private String modelData;
 
+    /** 名称 */
+    @Excel(name = "名称")
+    private String name;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
 }

+ 10 - 1
onemap-modules/onemap-model/src/main/resources/mapper/sanya/Modeling3DMapper.xml

@@ -9,10 +9,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="plotId"    column="plot_id"    />
         <result property="taskId"    column="task_id"    />
         <result property="modelData"    column="model_data"    />
+        <result property="name"    column="name"    />
+        <result property="createTime"    column="create_time"    />
     </resultMap>
 
     <sql id="selectModeling3DVo">
-        select id, plot_id, task_id, model_data from "base".t_fzss_fzxz_3d_modeling
+        select id, plot_id, task_id, model_data, name, create_time from "base".t_fzss_fzxz_3d_modeling
     </sql>
 
     <select id="selectModeling3DList" parameterType="com.onemap.sanya.domain.Modeling3D" resultMap="Modeling3DResult">
@@ -21,6 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="plotId != null  and plotId != ''"> and plot_id = #{plotId}</if>
             <if test="taskId != null  and taskId != ''"> and task_id = #{taskId}</if>
         </where>
+        order by create_time desc
+        limit 3
     </select>
     
     <select id="selectModeling3DById" parameterType="Long" resultMap="Modeling3DResult">
@@ -34,11 +38,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="plotId != null">plot_id,</if>
             <if test="taskId != null">task_id,</if>
             <if test="modelData != null">model_data,</if>
+            <if test="name != null">name,</if>
+            <if test="createTime != null">create_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="plotId != null">#{plotId},</if>
             <if test="taskId != null">#{taskId},</if>
             <if test="modelData != null">#{modelData},</if>
+            <if test="name != null">#{name},</if>
+            <if test="createTime != null">#{createTime},</if>
          </trim>
     </insert>
 
@@ -48,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="plotId != null">plot_id = #{plotId},</if>
             <if test="taskId != null">task_id = #{taskId},</if>
             <if test="modelData != null">model_data = #{modelData},</if>
+            <if test="name != null">name = #{name},</if>
         </trim>
         where id = #{id}
     </update>