|
@@ -13,13 +13,16 @@
|
|
|
<result column="project_type" property="projectType"/>
|
|
<result column="project_type" property="projectType"/>
|
|
|
<result column="on_chain_num" property="onChainNum"/>
|
|
<result column="on_chain_num" property="onChainNum"/>
|
|
|
<result column="creator_id" property="creatorId"/>
|
|
<result column="creator_id" property="creatorId"/>
|
|
|
|
|
+ <result column="first_plot_code" property="firstPlotCode"/>
|
|
|
|
|
+ <result column="second_plot_code" property="secondPlotCode"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<insert id="add" parameterType="com.siwei.apply.domain.Project">
|
|
<insert id="add" parameterType="com.siwei.apply.domain.Project">
|
|
|
INSERT INTO t_project (id, name, code, company,
|
|
INSERT INTO t_project (id, name, code, company,
|
|
|
- created_at, updated_at, project_type, creator_id)
|
|
|
|
|
|
|
+ created_at, updated_at, project_type,first_plot_code,second_plot_code, creator_id)
|
|
|
VALUES (#{id}, #{name}, #{code}, #{company}, now(), now(), #{projectType},
|
|
VALUES (#{id}, #{name}, #{code}, #{company}, now(), now(), #{projectType},
|
|
|
- #{creatorId})
|
|
|
|
|
|
|
+ #{firstPlotCode},#{secondPlotCode},
|
|
|
|
|
+ #{creatorId})
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
|
<select id="get" resultMap="projectMap">
|
|
<select id="get" resultMap="projectMap">
|
|
@@ -84,6 +87,8 @@
|
|
|
<if test="company != null">company = #{company},</if>
|
|
<if test="company != null">company = #{company},</if>
|
|
|
<if test="projectType != null">project_type = #{projectType},</if>
|
|
<if test="projectType != null">project_type = #{projectType},</if>
|
|
|
<if test="onChainNum != null">on_chain_num = #{onChainNum},</if>
|
|
<if test="onChainNum != null">on_chain_num = #{onChainNum},</if>
|
|
|
|
|
+ <if test="firstPlotCode != null">first_plot_code = #{firstPlotCode},</if>
|
|
|
|
|
+ <if test="secondPlotCode != null">second_plot_code = #{secondPlotCode},</if>
|
|
|
updated_at = now()
|
|
updated_at = now()
|
|
|
</set>
|
|
</set>
|
|
|
WHERE id = #{id}
|
|
WHERE id = #{id}
|