|
|
@@ -13,10 +13,12 @@
|
|
|
<result property="duration" column="duration" jdbcType="INTEGER"/>
|
|
|
<result property="remarks" column="remarks" jdbcType="VARCHAR"/>
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="mobile" column="mobile" jdbcType="VARCHAR"/>
|
|
|
+ <result property="callNo" column="call_no" jdbcType="VARCHAR"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="CallLogAllSql">
|
|
|
- id, uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time
|
|
|
+ id, uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time, mobile, call_no
|
|
|
</sql>
|
|
|
|
|
|
<!--查询单个-->
|
|
|
@@ -64,6 +66,12 @@
|
|
|
<if test="createTime != null">
|
|
|
and create_time = #{createTime}
|
|
|
</if>
|
|
|
+ <if test="mobile != null and mobile != ''">
|
|
|
+ and mobile = #{mobile}
|
|
|
+ </if>
|
|
|
+ <if test="callNo != null and callNo != ''">
|
|
|
+ and call_no = #{callNo}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
<if test="page_sql != null">
|
|
|
${page_sql}
|
|
|
@@ -105,32 +113,42 @@
|
|
|
<if test="createTime != null">
|
|
|
and create_time = #{createTime}
|
|
|
</if>
|
|
|
+ <if test="mobile != null and mobile != ''">
|
|
|
+ and mobile = #{mobile}
|
|
|
+ </if>
|
|
|
+ <if test="callNo != null and callNo != ''">
|
|
|
+ and call_no = #{callNo}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
<!--新增所有列-->
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time)
|
|
|
+ insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time,
|
|
|
+ mobile, call_no)
|
|
|
values (#{uid}, #{aid}, #{adminName}, #{contacts}, #{mobileLastDigits}, #{status}, #{duration}, #{remarks},
|
|
|
- #{createTime})
|
|
|
+ #{createTime}, #{mobile}, #{callNo})
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertBatch">
|
|
|
- insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time)
|
|
|
+ insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time,
|
|
|
+ mobile, call_no)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
(#{entity.uid}, #{entity.aid}, #{entity.adminName}, #{entity.contacts}, #{entity.mobileLastDigits},
|
|
|
- #{entity.status}, #{entity.duration}, #{entity.remarks}, #{entity.createTime})
|
|
|
+ #{entity.status}, #{entity.duration}, #{entity.remarks}, #{entity.createTime}, #{entity.mobile},
|
|
|
+ #{entity.callNo})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time)
|
|
|
+ insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time,
|
|
|
+ mobile, call_no)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
(#{entity.uid}, #{entity.aid}, #{entity.adminName}, #{entity.contacts}, #{entity.mobileLastDigits},
|
|
|
- #{entity.status}, #{entity.duration}, #{entity.remarks}, #{entity.createTime})
|
|
|
+ #{entity.status}, #{entity.duration}, #{entity.remarks}, #{entity.createTime}, #{entity.mobile},
|
|
|
+ #{entity.callNo})
|
|
|
</foreach>
|
|
|
on duplicate key update
|
|
|
uid = values(uid),
|
|
|
@@ -141,10 +159,11 @@
|
|
|
status = values(status),
|
|
|
duration = values(duration),
|
|
|
remarks = values(remarks),
|
|
|
- create_time = values(create_time)
|
|
|
+ create_time = values(create_time),
|
|
|
+ mobile = values(mobile),
|
|
|
+ call_no = values(call_no)
|
|
|
</insert>
|
|
|
|
|
|
-
|
|
|
<!--通过主键修改数据-->
|
|
|
<update id="update">
|
|
|
update call_log
|
|
|
@@ -176,6 +195,12 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime},
|
|
|
</if>
|
|
|
+ <if test="mobile != null and mobile != ''">
|
|
|
+ mobile = #{mobile},
|
|
|
+ </if>
|
|
|
+ <if test="callNo != null and callNo != ''">
|
|
|
+ call_no = #{callNo},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id}
|
|
|
</update>
|