Explorar o código

用地报批结构修改

gushoubang hai 2 meses
pai
achega
679899c7e7

+ 3 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/Ydbp.java

@@ -21,4 +21,7 @@ public class Ydbp {
     private Date pfDate;//批复日期
     private Map<String, Object> attachment; // 存储附件的目录树
     private Boolean hasOnchain;//是否上链
+    private String creatorId; // 创建人ID
+    private Date createdAt; // 创建时间
+    private Date updatedAt; // 更新时间
 }

+ 4 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/vo/YdbpUpdateVo.java

@@ -0,0 +1,4 @@
+package com.siwei.apply.domain.vo;
+
+public class YdbpUpdateVo {
+}

+ 4 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/vo/YdbpVo.java

@@ -0,0 +1,4 @@
+package com.siwei.apply.domain.vo;
+
+public class YdbpVo {
+}

+ 4 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/YdbpService.java

@@ -0,0 +1,4 @@
+package com.siwei.apply.service;
+
+public interface YdbpService {
+}

+ 4 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/impl/YdbpImpl.java

@@ -0,0 +1,4 @@
+package com.siwei.apply.service.impl;
+
+public class YdbpImpl {
+}

+ 18 - 12
siwei-modules/siwei-apply/src/main/resources/mapper/YdbpMapper.xml

@@ -16,6 +16,9 @@
         <result property="pfDate" column="pf_date"/>
         <result property="attachment" column="attachment" typeHandler="com.siwei.apply.handler.JsonbTypeHandler"/>
         <result property="hasOnchain" column="has_onchain"/>
+        <result property="creatorId" column="creator_id"/>
+        <result property="createdAt" column="created_at"/>
+        <result property="updatedAt" column="updated_at"/>
     </resultMap>
 
     <!-- 查询语句 -->
@@ -28,24 +31,27 @@
     <!-- 插入语句 -->
     <insert id="insert" parameterType="com.siwei.apply.domain.Ydbp">
         INSERT INTO t_ydbp (id, project_id, tdyt, yd_area, zs_area, has_zz,
-                            bp_date, pfwh, pf_date, has_onchain)
+                            bp_date, pfwh, pf_date, has_onchain, creator_id, created_at, updated_at)
         VALUES (#{id}, #{projectId}, #{tdyt}, #{ydArea}, #{zsArea}, #{hasZZ},
-                #{bpDate}, #{pfwh}, #{pfDate}, #{hasOnchain})
+                #{bpDate}, #{pfwh}, #{pfDate}, false, #{creatorId}, now(), now())
     </insert>
 
     <!-- 更新语句 -->
     <update id="updateById" parameterType="com.siwei.apply.domain.Ydbp">
         UPDATE t_ydbp
-        SET project_id  = #{projectId},
-            tdyt        = #{tdyt},
-            yd_area     = #{ydArea},
-            zs_area     = #{zsArea},
-            has_zz      = #{hasZZ},
-            bp_date     = #{bpDate},
-            pfwh        = #{pfwh},
-            pf_date     = #{pfDate},
-            attachment  = #{attachment, jdbcType=OTHER},
-            has_onchain = #{hasOnchain}
+        <set>
+            <if test="projectId != null">project_id = #{projectId},</if>
+            <if test="tdyt != null">tdyt = #{tdyt},</if>
+            <if test="ydArea != null">yd_area = #{ydArea},</if>
+            <if test="zsArea != null">zs_area = #{zsArea},</if>
+            <if test="hasZZ != null">has_zz = #{hasZZ},</if>
+            <if test="bpDate != null">bp_date = #{bpDate},</if>
+            <if test="pfwh != null">pfwh = #{pfwh},</if>
+            <if test="pfDate != null">pf_date = #{pfDate},</if>
+            <if test="attachment != null">attachment = #{attachment, jdbcType=OTHER},</if>
+            <if test="hasOnchain != null">has_onchain = #{hasOnchain},</if>
+            updated_at = now()
+        </set>
         WHERE id = #{id}
     </update>
 </mapper>