|
|
@@ -6,11 +6,12 @@
|
|
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
|
|
<result property="uid" column="uid" jdbcType="VARCHAR"/>
|
|
|
<result property="aid" column="aid" jdbcType="VARCHAR"/>
|
|
|
+ <result property="pid" column="pid" jdbcType="VARCHAR"/>
|
|
|
<result property="firstTime" column="first_time" jdbcType="TIMESTAMP"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="UserFirstInterviewAllSql">
|
|
|
- id, uid, aid, first_time
|
|
|
+ id, uid, aid, pid, first_time
|
|
|
</sql>
|
|
|
|
|
|
<!--查询单个-->
|
|
|
@@ -23,27 +24,28 @@
|
|
|
|
|
|
<!--新增所有列-->
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into user_first_interview(uid, aid, first_time)
|
|
|
- values (#{uid}, #{aid}, #{firstTime})
|
|
|
+ insert into user_first_interview(uid, aid, pid, first_time)
|
|
|
+ values (#{uid}, #{aid}, #{pid}, #{firstTime})
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertBatch">
|
|
|
- insert into user_first_interview(uid, aid, first_time)
|
|
|
+ insert into user_first_interview(uid, aid, pid, first_time)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
- (#{entity.uid}, #{entity.aid}, #{entity.firstTime})
|
|
|
+ (#{entity.uid}, #{entity.aid}, #{entity.pid}, #{entity.firstTime})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into user_first_interview(uid, aid, first_time)
|
|
|
+ insert into user_first_interview(uid, aid, pid, first_time)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
- (#{entity.uid}, #{entity.aid}, #{entity.firstTime})
|
|
|
+ (#{entity.uid}, #{entity.aid}, #{entity.pid}, #{entity.firstTime})
|
|
|
</foreach>
|
|
|
on duplicate key update
|
|
|
uid = values(uid),
|
|
|
aid = values(aid),
|
|
|
+ pid = values(pid),
|
|
|
first_time = values(first_time)
|
|
|
</insert>
|
|
|
|
|
|
@@ -57,6 +59,9 @@
|
|
|
<if test="aid != null and aid != ''">
|
|
|
aid = #{aid},
|
|
|
</if>
|
|
|
+ <if test="pid != null and pid != ''">
|
|
|
+ pid = #{pid},
|
|
|
+ </if>
|
|
|
<if test="firstTime != null">
|
|
|
first_time = #{firstTime},
|
|
|
</if>
|
|
|
@@ -80,6 +85,9 @@
|
|
|
<if test="aid != null and aid != ''">
|
|
|
and aid = #{aid}
|
|
|
</if>
|
|
|
+ <if test="pid != null and pid != ''">
|
|
|
+ and pid = #{pid}
|
|
|
+ </if>
|
|
|
<if test="firstTime != null">
|
|
|
and first_time = #{firstTime}
|
|
|
</if>
|
|
|
@@ -103,13 +111,15 @@
|
|
|
<if test="aid != null and aid != ''">
|
|
|
and aid = #{aid}
|
|
|
</if>
|
|
|
+ <if test="pid != null and pid != ''">
|
|
|
+ and pid = #{pid}
|
|
|
+ </if>
|
|
|
<if test="firstTime != null">
|
|
|
and first_time = #{firstTime}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
<!--通过主键删除-->
|
|
|
<delete id="deleteById">
|
|
|
delete
|
|
|
@@ -117,19 +127,5 @@
|
|
|
where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
- <select id="selectByUidAid" resultMap="UserFirstInterviewMap">
|
|
|
- select
|
|
|
- <include refid="UserFirstInterviewAllSql"/>
|
|
|
- from user_first_interview
|
|
|
- <where>
|
|
|
- <if test="uid != null and uid != ''">
|
|
|
- and uid = #{uid}
|
|
|
- </if>
|
|
|
- <if test="aid != null and aid != ''">
|
|
|
- and aid = #{aid}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
</mapper>
|
|
|
|