|
|
@@ -18,16 +18,19 @@
|
|
|
<result property="enterpriseCount" column="enterprise_count" jdbcType="INTEGER"/>
|
|
|
<result property="channelIndicators" column="channel_indicators" jdbcType="VARCHAR"/>
|
|
|
<result property="interviewDistribution" column="interview_distribution" jdbcType="VARCHAR"/>
|
|
|
+ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="awardsTime" column="awards_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="awardsStatus" column="awards_status" jdbcType="INTEGER"/>
|
|
|
</resultMap>
|
|
|
-
|
|
|
+
|
|
|
<sql id="UserArchivesAllSql">
|
|
|
-id, uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution
|
|
|
+ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution, update_time, awards_time, awards_status
|
|
|
</sql>
|
|
|
|
|
|
<!--查询单个-->
|
|
|
<select id="queryById" resultMap="UserArchivesMap">
|
|
|
select
|
|
|
- <include refid="UserArchivesAllSql"/>
|
|
|
+ <include refid="UserArchivesAllSql"/>
|
|
|
from user_archives
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
@@ -35,7 +38,7 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
|
|
|
<!--查询指定行数据-->
|
|
|
<select id="findUserArchivesList" resultMap="UserArchivesMap">
|
|
|
select
|
|
|
- <include refid="UserArchivesAllSql"/>
|
|
|
+ <include refid="UserArchivesAllSql"/>
|
|
|
|
|
|
from user_archives
|
|
|
<where>
|
|
|
@@ -84,9 +87,18 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
|
|
|
<if test="interviewDistribution != null and interviewDistribution != ''">
|
|
|
and interview_distribution = #{interviewDistribution}
|
|
|
</if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and update_time = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="awardsTime != null">
|
|
|
+ and awards_time = #{awardsTime}
|
|
|
+ </if>
|
|
|
+ <if test="awardsStatus != null">
|
|
|
+ and awards_status = #{awardsStatus}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
<if test="page_sql != null">
|
|
|
- ${page_sql}
|
|
|
+ ${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
@@ -140,44 +152,76 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
|
|
|
<if test="interviewDistribution != null and interviewDistribution != ''">
|
|
|
and interview_distribution = #{interviewDistribution}
|
|
|
</if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and update_time = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="awardsTime != null">
|
|
|
+ and awards_time = #{awardsTime}
|
|
|
+ </if>
|
|
|
+ <if test="awardsStatus != null">
|
|
|
+ and awards_status = #{awardsStatus}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<!--新增所有列-->
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution)
|
|
|
- values (#{uid}, #{patentCount}, #{inventionPatentCount}, #{utilityModelCount}, #{appearancePatentCount}, #{softwareWorksCount}, #{otherCount}, #{financialData}, #{earlyCommunication}, #{interviewIdeas}, #{createTime}, #{enterpriseCount}, #{channelIndicators}, #{interviewDistribution})
|
|
|
+ insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count,
|
|
|
+ appearance_patent_count, software_works_count, other_count, financial_data,
|
|
|
+ early_communication, interview_ideas, create_time, enterprise_count,
|
|
|
+ channel_indicators, interview_distribution, update_time, awards_time, awards_status)
|
|
|
+ values (#{uid}, #{patentCount}, #{inventionPatentCount}, #{utilityModelCount}, #{appearancePatentCount},
|
|
|
+ #{softwareWorksCount}, #{otherCount}, #{financialData}, #{earlyCommunication}, #{interviewIdeas},
|
|
|
+ #{createTime}, #{enterpriseCount}, #{channelIndicators}, #{interviewDistribution}, #{updateTime},
|
|
|
+ #{awardsTime}, #{awardsStatus})
|
|
|
</insert>
|
|
|
|
|
|
- <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution)
|
|
|
+ <insert id="insertBatch">
|
|
|
+ insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count,
|
|
|
+ appearance_patent_count, software_works_count, other_count, financial_data, early_communication,
|
|
|
+ interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution, update_time,
|
|
|
+ awards_time, awards_status)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
- (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount}, #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount}, #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime}, #{entity.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution})
|
|
|
+ (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount},
|
|
|
+ #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount},
|
|
|
+ #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime},
|
|
|
+ #{entity.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution},
|
|
|
+ #{entity.updateTime}, #{entity.awardsTime}, #{entity.awardsStatus})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution)
|
|
|
+ insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count,
|
|
|
+ appearance_patent_count, software_works_count, other_count, financial_data, early_communication,
|
|
|
+ interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution, update_time,
|
|
|
+ awards_time, awards_status)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
- (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount}, #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount}, #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime}, #{entity.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution})
|
|
|
+ (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount},
|
|
|
+ #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount},
|
|
|
+ #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime},
|
|
|
+ #{entity.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution},
|
|
|
+ #{entity.updateTime}, #{entity.awardsTime}, #{entity.awardsStatus})
|
|
|
</foreach>
|
|
|
on duplicate key update
|
|
|
-uid = values(uid),
|
|
|
-patent_count = values(patent_count),
|
|
|
-invention_patent_count = values(invention_patent_count),
|
|
|
-utility_model_count = values(utility_model_count),
|
|
|
-appearance_patent_count = values(appearance_patent_count),
|
|
|
-software_works_count = values(software_works_count),
|
|
|
-other_count = values(other_count),
|
|
|
-financial_data = values(financial_data),
|
|
|
-early_communication = values(early_communication),
|
|
|
-interview_ideas = values(interview_ideas),
|
|
|
-create_time = values(create_time),
|
|
|
-enterprise_count = values(enterprise_count),
|
|
|
-channel_indicators = values(channel_indicators),
|
|
|
-interview_distribution = values(interview_distribution)
|
|
|
+ uid = values(uid),
|
|
|
+ patent_count = values(patent_count),
|
|
|
+ invention_patent_count = values(invention_patent_count),
|
|
|
+ utility_model_count = values(utility_model_count),
|
|
|
+ appearance_patent_count = values(appearance_patent_count),
|
|
|
+ software_works_count = values(software_works_count),
|
|
|
+ other_count = values(other_count),
|
|
|
+ financial_data = values(financial_data),
|
|
|
+ early_communication = values(early_communication),
|
|
|
+ interview_ideas = values(interview_ideas),
|
|
|
+ create_time = values(create_time),
|
|
|
+ enterprise_count = values(enterprise_count),
|
|
|
+ channel_indicators = values(channel_indicators),
|
|
|
+ interview_distribution = values(interview_distribution),
|
|
|
+ update_time = values(update_time),
|
|
|
+ awards_time = values(awards_time),
|
|
|
+ awards_status = values(awards_status)
|
|
|
</insert>
|
|
|
|
|
|
<!--通过主键修改数据-->
|
|
|
@@ -226,13 +270,24 @@ interview_distribution = values(interview_distribution)
|
|
|
<if test="interviewDistribution != null and interviewDistribution != ''">
|
|
|
interview_distribution = #{interviewDistribution},
|
|
|
</if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time = #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="awardsTime != null">
|
|
|
+ awards_time = #{awardsTime},
|
|
|
+ </if>
|
|
|
+ <if test="awardsStatus != null">
|
|
|
+ awards_status = #{awardsStatus},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
|
|
|
<!--通过主键删除-->
|
|
|
<delete id="deleteById">
|
|
|
- delete from user_archives where id = #{id}
|
|
|
+ delete
|
|
|
+ from user_archives
|
|
|
+ where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<select id="queryByUid" resultMap="UserArchivesMap">
|