|
|
@@ -20,11 +20,12 @@
|
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
|
<result column="open_time" jdbcType="TIMESTAMP" property="openTime" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, user_name, rd_no, ip_no, rd_name, rd_start, rd_end, technical_field, technology_source,
|
|
|
total_amount, recent_three_amount, rd_objective, core_technology, achieve_results,
|
|
|
- consultant_name, `status`, open_time, create_time
|
|
|
+ consultant_name, `status`, open_time, create_time, aid
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -32,8 +33,7 @@
|
|
|
from rd_details
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</select>
|
|
|
-
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
delete from rd_details
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</delete>
|
|
|
@@ -43,13 +43,15 @@
|
|
|
technical_field, technology_source, total_amount,
|
|
|
recent_three_amount, rd_objective, core_technology,
|
|
|
achieve_results, consultant_name, `status`,
|
|
|
- open_time, create_time)
|
|
|
+ open_time, create_time, aid
|
|
|
+ )
|
|
|
values (#{userName,jdbcType=VARCHAR}, #{rdNo,jdbcType=VARCHAR}, #{ipNo,jdbcType=VARCHAR},
|
|
|
#{rdName,jdbcType=VARCHAR}, #{rdStart,jdbcType=TIMESTAMP}, #{rdEnd,jdbcType=TIMESTAMP},
|
|
|
#{technicalField,jdbcType=VARCHAR}, #{technologySource,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL},
|
|
|
#{recentThreeAmount,jdbcType=DECIMAL}, #{rdObjective,jdbcType=VARCHAR}, #{coreTechnology,jdbcType=VARCHAR},
|
|
|
#{achieveResults,jdbcType=VARCHAR}, #{consultantName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
|
|
|
- #{openTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ #{openTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{aid,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.RdDetails" useGeneratedKeys="true">
|
|
|
insert into rd_details
|
|
|
@@ -105,6 +107,9 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="userName != null">
|
|
|
@@ -158,8 +163,12 @@
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="aid != null">
|
|
|
+ #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
+
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.RdDetails">
|
|
|
update rd_details
|
|
|
<set>
|
|
|
@@ -214,6 +223,9 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
@@ -235,7 +247,8 @@
|
|
|
consultant_name = #{consultantName,jdbcType=VARCHAR},
|
|
|
`status` = #{status,jdbcType=INTEGER},
|
|
|
open_time = #{openTime,jdbcType=TIMESTAMP},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ aid = #{aid,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
|
|
|
@@ -286,6 +299,25 @@
|
|
|
and a.rd_name =#{RdName}
|
|
|
</if>
|
|
|
</select>
|
|
|
+ <insert id="insertBatch">
|
|
|
+ insert into rd_details (user_name, rd_no, ip_no,
|
|
|
+ rd_name, rd_start, rd_end,
|
|
|
+ technical_field, technology_source, total_amount,
|
|
|
+ recent_three_amount, rd_objective, core_technology,
|
|
|
+ achieve_results, consultant_name, `status`,
|
|
|
+ open_time, create_time, aid
|
|
|
+ ) values
|
|
|
+ <foreach item="item" index="index" collection="list" separator=",">
|
|
|
+ (#{item.userName,jdbcType=VARCHAR}, #{item.rdNo,jdbcType=VARCHAR}, #{item.ipNo,jdbcType=VARCHAR},
|
|
|
+ #{item.rdName,jdbcType=VARCHAR}, #{item.rdStart,jdbcType=TIMESTAMP}, #{item.rdEnd,jdbcType=TIMESTAMP},
|
|
|
+ #{item.technicalField,jdbcType=VARCHAR}, #{item.technologySource,jdbcType=VARCHAR}, #{item.totalAmount,jdbcType=DECIMAL},
|
|
|
+ #{item.recentThreeAmount,jdbcType=DECIMAL}, #{item.rdObjective,jdbcType=VARCHAR}, #{item.coreTechnology,jdbcType=VARCHAR},
|
|
|
+ #{item.achieveResults,jdbcType=VARCHAR}, #{item.consultantName,jdbcType=VARCHAR}, #{item.status,jdbcType=INTEGER},
|
|
|
+ #{item.openTime,jdbcType=TIMESTAMP}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.aid,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
|
|
|
|
|
|
+ </insert>
|
|
|
+
|
|
|
</mapper>
|