|
|
@@ -10,17 +10,21 @@
|
|
|
<result property="utilityModelCount" column="utility_model_count" jdbcType="INTEGER"/>
|
|
|
<result property="appearancePatentCount" column="appearance_patent_count" jdbcType="INTEGER"/>
|
|
|
<result property="softwareWorksCount" column="software_works_count" jdbcType="INTEGER"/>
|
|
|
- <result property="other" column="other" jdbcType="INTEGER"/>
|
|
|
+ <result property="otherCount" column="other_count" jdbcType="INTEGER"/>
|
|
|
<result property="financialData" column="financial_data" jdbcType="VARCHAR"/>
|
|
|
<result property="earlyCommunication" column="early_communication" jdbcType="VARCHAR"/>
|
|
|
<result property="interviewIdeas" column="interview_ideas" jdbcType="VARCHAR"/>
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
</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
|
|
|
+ </sql>
|
|
|
|
|
|
<!--查询单个-->
|
|
|
<select id="queryById" resultMap="UserArchivesMap">
|
|
|
select
|
|
|
-id, uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other, financial_data, early_communication, interview_ideas, create_time
|
|
|
+ <include refid="UserArchivesAllSql"/>
|
|
|
from user_archives
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
@@ -28,7 +32,8 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
|
|
|
<!--查询指定行数据-->
|
|
|
<select id="findUserArchivesList" resultMap="UserArchivesMap">
|
|
|
select
|
|
|
-id, uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other, financial_data, early_communication, interview_ideas, create_time
|
|
|
+ <include refid="UserArchivesAllSql"/>
|
|
|
+
|
|
|
from user_archives
|
|
|
<where>
|
|
|
<if test="id != null">
|
|
|
@@ -52,8 +57,8 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
|
|
|
<if test="softwareWorksCount != null">
|
|
|
and software_works_count = #{softwareWorksCount}
|
|
|
</if>
|
|
|
- <if test="other != null">
|
|
|
- and other = #{other}
|
|
|
+ <if test="otherCount != null">
|
|
|
+ and other_count = #{otherCount}
|
|
|
</if>
|
|
|
<if test="financialData != null and financialData != ''">
|
|
|
and financial_data = #{financialData}
|
|
|
@@ -97,8 +102,8 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
|
|
|
<if test="softwareWorksCount != null">
|
|
|
and software_works_count = #{softwareWorksCount}
|
|
|
</if>
|
|
|
- <if test="other != null">
|
|
|
- and other = #{other}
|
|
|
+ <if test="otherCount != null">
|
|
|
+ and other_count = #{otherCount}
|
|
|
</if>
|
|
|
<if test="financialData != null and financialData != ''">
|
|
|
and financial_data = #{financialData}
|
|
|
@@ -118,23 +123,23 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
|
|
|
|
|
|
<!--新增所有列-->
|
|
|
<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, financial_data, early_communication, interview_ideas, create_time)
|
|
|
- values (#{uid}, #{patentCount}, #{inventionPatentCount}, #{utilityModelCount}, #{appearancePatentCount}, #{softwareWorksCount}, #{other}, #{financialData}, #{earlyCommunication}, #{interviewIdeas}, #{createTime})
|
|
|
+ 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)
|
|
|
+ values (#{uid}, #{patentCount}, #{inventionPatentCount}, #{utilityModelCount}, #{appearancePatentCount}, #{softwareWorksCount}, #{otherCount}, #{financialData}, #{earlyCommunication}, #{interviewIdeas}, #{createTime})
|
|
|
</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, 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)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
- (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount}, #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.other}, #{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})
|
|
|
</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, 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)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
- (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount}, #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.other}, #{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})
|
|
|
</foreach>
|
|
|
on duplicate key update
|
|
|
uid = values(uid),
|
|
|
@@ -143,7 +148,7 @@ 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 = values(other),
|
|
|
+other_count = values(other_count),
|
|
|
financial_data = values(financial_data),
|
|
|
early_communication = values(early_communication),
|
|
|
interview_ideas = values(interview_ideas),
|
|
|
@@ -172,8 +177,8 @@ create_time = values(create_time)
|
|
|
<if test="softwareWorksCount != null">
|
|
|
software_works_count = #{softwareWorksCount},
|
|
|
</if>
|
|
|
- <if test="other != null">
|
|
|
- other = #{other},
|
|
|
+ <if test="otherCount != null">
|
|
|
+ other_count = #{otherCount},
|
|
|
</if>
|
|
|
<if test="financialData != null and financialData != ''">
|
|
|
financial_data = #{financialData},
|
|
|
@@ -198,10 +203,8 @@ create_time = values(create_time)
|
|
|
|
|
|
<select id="queryByUid" resultMap="UserArchivesMap">
|
|
|
select
|
|
|
- id, uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other, financial_data, early_communication, interview_ideas, create_time
|
|
|
- from user_archives
|
|
|
+ <include refid="UserArchivesAllSql"/>
|
|
|
where uid = #{id}
|
|
|
</select>
|
|
|
-
|
|
|
</mapper>
|
|
|
|