|
@@ -2,7 +2,7 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.care.outcall.mapper.KoalaOutCallDao">
|
|
|
|
|
|
- <select id="getKoalaAccountNoAndApiSecretByUserId" resultType="Map">
|
|
|
+ <select id="getAgentInfo" resultType="Map">
|
|
|
select
|
|
|
substring(cua.agent_id, 1, INSTR(cua.agent_id, '@') - 1) as agentId,
|
|
|
cua.agent_password as agentPassword,
|
|
@@ -29,8 +29,11 @@
|
|
|
<if test="orderId!=null and orderId!='' ">
|
|
|
order_id,
|
|
|
</if>
|
|
|
- <if test="contactId!=null and contactId!='' ">
|
|
|
- contact_id,
|
|
|
+ <if test="calledId!=null and calledId!='' ">
|
|
|
+ called_id,
|
|
|
+ </if>
|
|
|
+ <if test="calledType!=null and calledType!='' ">
|
|
|
+ called_type,
|
|
|
</if>
|
|
|
<if test="phone!=null and phone!='' ">
|
|
|
phone,
|
|
@@ -84,8 +87,11 @@
|
|
|
<if test="orderId!=null and orderId!='' ">
|
|
|
#{orderId},
|
|
|
</if>
|
|
|
- <if test="contactId!=null and contactId!='' ">
|
|
|
- #{contactId},
|
|
|
+ <if test="calledId!=null and calledId!='' ">
|
|
|
+ #{calledId},
|
|
|
+ </if>
|
|
|
+ <if test="calledType!=null and calledType!='' ">
|
|
|
+ #{calledType},
|
|
|
</if>
|
|
|
<if test="phone!=null and phone!='' ">
|
|
|
#{phone},
|
|
@@ -133,7 +139,8 @@
|
|
|
station_id as stationId,
|
|
|
older_id as olderId,
|
|
|
order_id as orderId,
|
|
|
- contact_id as contactId,
|
|
|
+ called_id as calledId,
|
|
|
+ called_type as calledType,
|
|
|
phone as phone,
|
|
|
tenant_id as tenantId,
|
|
|
agent_id as agentId,
|
|
@@ -216,8 +223,11 @@
|
|
|
<if test="stationId!=null and stationId!=''">
|
|
|
station_id,
|
|
|
</if>
|
|
|
- <if test="contactId!=null and contactId!=''">
|
|
|
- contact_id,
|
|
|
+ <if test="calledId!=null and calledId!=''">
|
|
|
+ called_id,
|
|
|
+ </if>
|
|
|
+ <if test="calledType!=null and calledType!=''">
|
|
|
+ called_type,
|
|
|
</if>
|
|
|
create_time,
|
|
|
update_time
|
|
@@ -283,8 +293,11 @@
|
|
|
<if test="stationId!=null">
|
|
|
#{stationId},
|
|
|
</if>
|
|
|
- <if test="contactId!=null">
|
|
|
- #{contactId},
|
|
|
+ <if test="calledId!=null">
|
|
|
+ #{calledId},
|
|
|
+ </if>
|
|
|
+ <if test="calledType!=null">
|
|
|
+ #{calledType},
|
|
|
</if>
|
|
|
now(),
|
|
|
now()
|
|
@@ -349,8 +362,11 @@
|
|
|
<if test="stationId!=null and stationId!='' ">
|
|
|
station_id=#{stationId},
|
|
|
</if>
|
|
|
- <if test="contactId!=null and contactId!='' ">
|
|
|
- contact_id=#{contactId},
|
|
|
+ <if test="calledId!=null and calledId!='' ">
|
|
|
+ called_id=#{calledId},
|
|
|
+ </if>
|
|
|
+ <if test="calledType!=null and calledType!='' ">
|
|
|
+ called_type=#{calledType},
|
|
|
</if>
|
|
|
</set>
|
|
|
WHERE session_id=#{sessionId}
|
|
@@ -384,8 +400,9 @@
|
|
|
distinct ckl.session_id as sessionId,
|
|
|
ckl.org_id as orgId,
|
|
|
ckl.older_id as olderId,
|
|
|
- ckl.order_id as orderId,
|
|
|
- ckl.contact_id as contactId,
|
|
|
+ ckl.order_id as orderId,
|
|
|
+ ckl.called_id as calledId,
|
|
|
+ ckl.called_type as calledType,
|
|
|
ckl.phone as phone,
|
|
|
date_format(ckl.create_time, '%Y%m%d%H%i%s') createTime
|
|
|
from cc_koala_log ckl
|