|
@@ -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>
|