|
@@ -21,11 +21,13 @@
|
|
|
<result column="open_time" jdbcType="TIMESTAMP" property="openTime" />
|
|
<result column="open_time" jdbcType="TIMESTAMP" property="openTime" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
<result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
<result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
|
|
+ <result column="browse_count" jdbcType="INTEGER" property="browseCount" />
|
|
|
|
|
+ <result column="download_count" jdbcType="INTEGER" property="downloadCount" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
|
id, user_name, rd_no, ip_no, rd_name, rd_start, rd_end, technical_field, technology_source,
|
|
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,
|
|
total_amount, recent_three_amount, rd_objective, core_technology, achieve_results,
|
|
|
- consultant_name, `status`, open_time, create_time, aid
|
|
|
|
|
|
|
+ consultant_name, `status`, open_time, create_time, aid, browse_count, download_count
|
|
|
</sql>
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
select
|
|
select
|
|
@@ -43,15 +45,15 @@
|
|
|
technical_field, technology_source, total_amount,
|
|
technical_field, technology_source, total_amount,
|
|
|
recent_three_amount, rd_objective, core_technology,
|
|
recent_three_amount, rd_objective, core_technology,
|
|
|
achieve_results, consultant_name, `status`,
|
|
achieve_results, consultant_name, `status`,
|
|
|
- open_time, create_time, aid
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ open_time, create_time, aid,
|
|
|
|
|
+ browse_count, download_count)
|
|
|
values (#{userName,jdbcType=VARCHAR}, #{rdNo,jdbcType=VARCHAR}, #{ipNo,jdbcType=VARCHAR},
|
|
values (#{userName,jdbcType=VARCHAR}, #{rdNo,jdbcType=VARCHAR}, #{ipNo,jdbcType=VARCHAR},
|
|
|
#{rdName,jdbcType=VARCHAR}, #{rdStart,jdbcType=TIMESTAMP}, #{rdEnd,jdbcType=TIMESTAMP},
|
|
#{rdName,jdbcType=VARCHAR}, #{rdStart,jdbcType=TIMESTAMP}, #{rdEnd,jdbcType=TIMESTAMP},
|
|
|
#{technicalField,jdbcType=VARCHAR}, #{technologySource,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL},
|
|
#{technicalField,jdbcType=VARCHAR}, #{technologySource,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL},
|
|
|
#{recentThreeAmount,jdbcType=DECIMAL}, #{rdObjective,jdbcType=VARCHAR}, #{coreTechnology,jdbcType=VARCHAR},
|
|
#{recentThreeAmount,jdbcType=DECIMAL}, #{rdObjective,jdbcType=VARCHAR}, #{coreTechnology,jdbcType=VARCHAR},
|
|
|
#{achieveResults,jdbcType=VARCHAR}, #{consultantName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
|
|
#{achieveResults,jdbcType=VARCHAR}, #{consultantName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
|
|
|
- #{openTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{aid,jdbcType=VARCHAR}
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ #{openTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{aid,jdbcType=VARCHAR},
|
|
|
|
|
+ #{browseCount,jdbcType=INTEGER}, #{downloadCount,jdbcType=INTEGER})
|
|
|
</insert>
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.RdDetails" useGeneratedKeys="true">
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.RdDetails" useGeneratedKeys="true">
|
|
|
insert into rd_details
|
|
insert into rd_details
|
|
@@ -110,6 +112,12 @@
|
|
|
<if test="aid != null">
|
|
<if test="aid != null">
|
|
|
aid,
|
|
aid,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="browseCount != null">
|
|
|
|
|
+ browse_count,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="downloadCount != null">
|
|
|
|
|
+ download_count,
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="userName != null">
|
|
<if test="userName != null">
|
|
@@ -166,9 +174,14 @@
|
|
|
<if test="aid != null">
|
|
<if test="aid != null">
|
|
|
#{aid,jdbcType=VARCHAR},
|
|
#{aid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="browseCount != null">
|
|
|
|
|
+ #{browseCount,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="downloadCount != null">
|
|
|
|
|
+ #{downloadCount,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
-
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.RdDetails">
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.RdDetails">
|
|
|
update rd_details
|
|
update rd_details
|
|
|
<set>
|
|
<set>
|
|
@@ -226,6 +239,12 @@
|
|
|
<if test="aid != null">
|
|
<if test="aid != null">
|
|
|
aid = #{aid,jdbcType=VARCHAR},
|
|
aid = #{aid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="browseCount != null">
|
|
|
|
|
+ browse_count = #{browseCount,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="downloadCount != null">
|
|
|
|
|
+ download_count = #{downloadCount,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
</set>
|
|
</set>
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
</update>
|
|
@@ -248,7 +267,9 @@
|
|
|
`status` = #{status,jdbcType=INTEGER},
|
|
`status` = #{status,jdbcType=INTEGER},
|
|
|
open_time = #{openTime,jdbcType=TIMESTAMP},
|
|
open_time = #{openTime,jdbcType=TIMESTAMP},
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- aid = #{aid,jdbcType=VARCHAR}
|
|
|
|
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
|
|
+ browse_count = #{browseCount,jdbcType=INTEGER},
|
|
|
|
|
+ download_count = #{downloadCount,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
@@ -259,9 +280,9 @@
|
|
|
</select>
|
|
</select>
|
|
|
<sql id="details_List">
|
|
<sql id="details_List">
|
|
|
a.id, a.user_name userName, a.rd_no rdNo, a.ip_no ipNo, a.rd_name rdName,a.technical_field technicalField,
|
|
a.id, a.user_name userName, a.rd_no rdNo, a.ip_no ipNo, a.rd_name rdName,a.technical_field technicalField,
|
|
|
- a.technology_source technologySource, a.total_amount totalAmount, a.recent_three_amount recentThreeAmount,
|
|
|
|
|
- a.rd_objective rdObjective, a.core_technology coreTechnology, a.achieve_results achieveResults,
|
|
|
|
|
- a.consultant_name consultantName, a.status, date_format(a.rd_start, '%Y-%m-%d %H:%i:%s') rdStartS,
|
|
|
|
|
|
|
+ a.technology_source technologySource, a.total_amount totalAmount, a.recent_three_amount recentThreeAmount,a.aid,
|
|
|
|
|
+ a.rd_objective rdObjective, a.core_technology coreTechnology, a.achieve_results achieveResults,a.consultant_name consultantName,
|
|
|
|
|
+ a.status,a.browse_count browseCount ,a.download_count downloadCount, date_format(a.rd_start, '%Y-%m-%d %H:%i:%s') rdStartS,
|
|
|
date_format(a.rd_end , '%Y-%m-%d %H:%i:%s') rdEndS,date_format(a.open_time, '%Y-%m-%d %H:%i:%s')openTimeS,
|
|
date_format(a.rd_end , '%Y-%m-%d %H:%i:%s') rdEndS,date_format(a.open_time, '%Y-%m-%d %H:%i:%s')openTimeS,
|
|
|
date_format(a.create_time, '%Y-%m-%d %H:%i:%s') createTimeS
|
|
date_format(a.create_time, '%Y-%m-%d %H:%i:%s') createTimeS
|
|
|
</sql>
|
|
</sql>
|
|
@@ -272,7 +293,7 @@
|
|
|
where a.id =#{id}
|
|
where a.id =#{id}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
- <select id="RdDetailsList" resultType="com.goafanti.RD.bo.OutRdDetails">
|
|
|
|
|
|
|
+ <select id="RdDetailsList" resultType="com.goafanti.RD.bo.InputExcelRdDetails">
|
|
|
select
|
|
select
|
|
|
<include refid="details_List" />
|
|
<include refid="details_List" />
|
|
|
from rd_details a
|
|
from rd_details a
|