|
@@ -18,7 +18,7 @@
|
|
|
<result property="jsgm" column="jsgm"/>
|
|
|
<result property="zsbh" column="zsbh"/>
|
|
|
<result property="fzjg" column="fzjg"/>
|
|
|
- <result property="fzri" column="fzri"/>
|
|
|
+ <result property="fzDate" column="fz_date"/>
|
|
|
<result property="attachment" column="attachment" typeHandler="com.siwei.apply.handler.JsonbTypeHandler"/>
|
|
|
<result property="hasOnchain" column="has_onchain"/>
|
|
|
<result property="creatorId" column="creator_id"/>
|
|
@@ -26,23 +26,29 @@
|
|
|
<result property="updatedAt" column="updated_at"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <select id="isExit" resultType="Boolean">
|
|
|
+ SELECT COUNT(1) > 0
|
|
|
+ FROM t_jsydghxk
|
|
|
+ WHERE project_id = #{projectId}
|
|
|
+ </select>
|
|
|
+
|
|
|
<!-- 添加记录 -->
|
|
|
<insert id="add" parameterType="com.siwei.apply.domain.Jsydghxk">
|
|
|
INSERT INTO t_jsydghxk (id, project_id, yddw, ydwz, yd_area, tdyt, tdhqfs, pzydjg, pzydwh,
|
|
|
- jsgm, zsbh, fzjg, fzri, has_onchain, creator_id, created_at, updated_at)
|
|
|
+ jsgm, zsbh, fzjg, fz_date, has_onchain, creator_id, created_at, updated_at)
|
|
|
VALUES (#{id}, #{projectId}, #{yddw}, #{ydwz}, #{ydArea}, #{tdyt}, #{tdhqfs}, #{pzydjg}, #{pzydwh},
|
|
|
- #{jsgm}, #{zsbh}, #{fzjg}, #{fzri}, false, #{creatorId}, now(), now())
|
|
|
+ #{jsgm}, #{zsbh}, #{fzjg}, #{fzDate}, false, #{creatorId}, now(), now())
|
|
|
</insert>
|
|
|
|
|
|
- <!-- 根据ID获取记录 -->
|
|
|
+ <!-- 根据项目ID获取记录 -->
|
|
|
<select id="get" resultMap="BaseResultMap" parameterType="String">
|
|
|
SELECT *
|
|
|
FROM t_jsydghxk
|
|
|
- WHERE id = #{id}
|
|
|
+ WHERE project_id = #{projectId}
|
|
|
</select>
|
|
|
|
|
|
- <!-- 根据ID更新记录 -->
|
|
|
- <update id="update" parameterType="com.siwei.apply.domain.Jsydghxk">
|
|
|
+ <!-- 更新记录 -->
|
|
|
+ <update id="update" parameterType="com.siwei.apply.domain.vo.JsydghxkUpdateVo">
|
|
|
UPDATE t_jsydghxk
|
|
|
<set>
|
|
|
<if test="projectId != null">project_id = #{projectId},</if>
|
|
@@ -56,9 +62,8 @@
|
|
|
<if test="jsgm != null">jsgm = #{jsgm},</if>
|
|
|
<if test="zsbh != null">zsbh = #{zsbh},</if>
|
|
|
<if test="fzjg != null">fzjg = #{fzjg},</if>
|
|
|
- <if test="fzri != null">fzri = #{fzri},</if>
|
|
|
+ <if test="fzDate != null">fz_date = #{fzDate},</if>
|
|
|
<if test="hasOnchain != null">has_onchain = #{hasOnchain},</if>
|
|
|
- <if test="creatorId != null">creator_id = #{creatorId},</if>
|
|
|
updated_at = now()
|
|
|
</set>
|
|
|
WHERE id = #{id}
|