|
|
@@ -15,10 +15,13 @@
|
|
|
<result property="earlyCommunication" column="early_communication" jdbcType="VARCHAR"/>
|
|
|
<result property="interviewIdeas" column="interview_ideas" jdbcType="VARCHAR"/>
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="enterpriseCount" column="enterprise_count" jdbcType="INTEGER"/>
|
|
|
+ <result property="channelIndicators" column="channel_indicators" jdbcType="VARCHAR"/>
|
|
|
+ <result property="interviewDistribution" column="interview_distribution" jdbcType="VARCHAR"/>
|
|
|
</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
|
|
|
+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
|
|
|
</sql>
|
|
|
|
|
|
<!--查询单个-->
|
|
|
@@ -72,8 +75,19 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
|
|
|
<if test="createTime != null">
|
|
|
and create_time = #{createTime}
|
|
|
</if>
|
|
|
+ <if test="enterpriseCount != null">
|
|
|
+ and enterprise_count = #{enterpriseCount}
|
|
|
+ </if>
|
|
|
+ <if test="channelIndicators != null and channelIndicators != ''">
|
|
|
+ and channel_indicators = #{channelIndicators}
|
|
|
+ </if>
|
|
|
+ <if test="interviewDistribution != null and interviewDistribution != ''">
|
|
|
+ and interview_distribution = #{interviewDistribution}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
- limit #{pageable.offset}, #{pageable.pageSize}
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<!--统计总行数-->
|
|
|
@@ -117,28 +131,37 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
|
|
|
<if test="createTime != null">
|
|
|
and create_time = #{createTime}
|
|
|
</if>
|
|
|
+ <if test="enterpriseCount != null">
|
|
|
+ and enterprise_count = #{enterpriseCount}
|
|
|
+ </if>
|
|
|
+ <if test="channelIndicators != null and channelIndicators != ''">
|
|
|
+ and channel_indicators = #{channelIndicators}
|
|
|
+ </if>
|
|
|
+ <if test="interviewDistribution != null and interviewDistribution != ''">
|
|
|
+ and interview_distribution = #{interviewDistribution}
|
|
|
+ </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)
|
|
|
- values (#{uid}, #{patentCount}, #{inventionPatentCount}, #{utilityModelCount}, #{appearancePatentCount}, #{softwareWorksCount}, #{otherCount}, #{financialData}, #{earlyCommunication}, #{interviewIdeas})
|
|
|
+ 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>
|
|
|
|
|
|
<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)
|
|
|
+ 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
|
|
|
<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.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})
|
|
|
</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)
|
|
|
+ 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
|
|
|
<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.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})
|
|
|
</foreach>
|
|
|
on duplicate key update
|
|
|
uid = values(uid),
|
|
|
@@ -151,7 +174,10 @@ 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)
|
|
|
+create_time = values(create_time),
|
|
|
+enterprise_count = values(enterprise_count),
|
|
|
+channel_indicators = values(channel_indicators),
|
|
|
+interview_distribution = values(interview_distribution)
|
|
|
</insert>
|
|
|
|
|
|
<!--通过主键修改数据-->
|
|
|
@@ -191,6 +217,15 @@ create_time = values(create_time)
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime},
|
|
|
</if>
|
|
|
+ <if test="enterpriseCount != null">
|
|
|
+ enterprise_count = #{enterpriseCount},
|
|
|
+ </if>
|
|
|
+ <if test="channelIndicators != null and channelIndicators != ''">
|
|
|
+ channel_indicators = #{channelIndicators},
|
|
|
+ </if>
|
|
|
+ <if test="interviewDistribution != null and interviewDistribution != ''">
|
|
|
+ interview_distribution = #{interviewDistribution},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id}
|
|
|
</update>
|