|
@@ -0,0 +1,149 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper
|
|
|
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.slibra.business.mapper.CAgentMonitorMapper">
|
|
|
+
|
|
|
+ <resultMap type="CAgentMonitor" id="CAgentMonitorResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="saasId" column="saas_id" />
|
|
|
+ <result property="agentNum" column="agent_num" />
|
|
|
+ <result property="outId" column="out_id" />
|
|
|
+ <result property="identityType" column="identity_type" />
|
|
|
+ <result property="checkState" column="check_state" />
|
|
|
+ <result property="checkScene" column="check_scene" />
|
|
|
+ <result property="checkInTime" column="check_in_time" />
|
|
|
+ <result property="checkOutTime" column="check_out_time" />
|
|
|
+ <result property="serviceState" column="service_state" />
|
|
|
+ <result property="busyTime" column="busy_time" />
|
|
|
+ <result property="idleTime" column="idle_time" />
|
|
|
+ <result property="callTime" column="call_time" />
|
|
|
+ <result property="hangTime" column="hang_time" />
|
|
|
+ <result property="heartState" column="heart_state" />
|
|
|
+ <result property="heartTime" column="heart_time" />
|
|
|
+ <result property="sessionId" column="session_id" />
|
|
|
+ <result property="isDelete" column="is_delete" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectCAgentMonitorVo">
|
|
|
+ select id, saas_id, agent_num, out_id, identity_type, check_state, check_scene, check_in_time, check_out_time, service_state, busy_time, idle_time, call_time, hang_time, heart_state, heart_time, session_id, is_delete, update_time, create_time from c_agent_monitor
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectCAgentMonitorList" parameterType="CAgentMonitor" resultMap="CAgentMonitorResult">
|
|
|
+ <include refid="selectCAgentMonitorVo"/>
|
|
|
+ <where>
|
|
|
+ 1 = 1
|
|
|
+ <if test="saasId != null and saasId != ''"> and saas_id = #{saasId}</if>
|
|
|
+ <if test="agentNum != null and agentNum != ''"> and agent_num = #{agentNum}</if>
|
|
|
+ <if test="outId != null and outId != ''"> and out_id = #{outId}</if>
|
|
|
+ <if test="identityType != null "> and identity_type = #{identityType}</if>
|
|
|
+ <if test="checkState != null "> and check_state = #{checkState}</if>
|
|
|
+ <if test="checkScene != null and checkScene != ''"> and check_scene = #{checkScene}</if>
|
|
|
+ <if test="checkInTime != null "> and check_in_time = #{checkInTime}</if>
|
|
|
+ <if test="checkOutTime != null "> and check_out_time = #{checkOutTime}</if>
|
|
|
+ <if test="serviceState != null "> and service_state = #{serviceState}</if>
|
|
|
+ <if test="busyTime != null "> and busy_time = #{busyTime}</if>
|
|
|
+ <if test="idleTime != null "> and idle_time = #{idleTime}</if>
|
|
|
+ <if test="callTime != null "> and call_time = #{callTime}</if>
|
|
|
+ <if test="hangTime != null "> and hang_time = #{hangTime}</if>
|
|
|
+ <if test="heartState != null "> and heart_state = #{heartState}</if>
|
|
|
+ <if test="heartTime != null "> and heart_time = #{heartTime}</if>
|
|
|
+ <if test="sessionId != null and sessionId != ''"> and session_id = #{sessionId}</if>
|
|
|
+ <if test="isDelete != null "> and is_delete = #{isDelete}</if>
|
|
|
+ </where>
|
|
|
+ and del_flag = 0 order by id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectCAgentMonitorById" parameterType="String" resultMap="CAgentMonitorResult">
|
|
|
+ <include refid="selectCAgentMonitorVo"/>
|
|
|
+ where id = #{id} and del_flag = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertCAgentMonitor" parameterType="CAgentMonitor" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into c_agent_monitor
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="saasId != null and saasId != ''">saas_id,</if>
|
|
|
+ <if test="agentNum != null and agentNum != ''">agent_num,</if>
|
|
|
+ <if test="outId != null and outId != ''">out_id,</if>
|
|
|
+ <if test="identityType != null">identity_type,</if>
|
|
|
+ <if test="checkState != null">check_state,</if>
|
|
|
+ <if test="checkScene != null and checkScene != ''">check_scene,</if>
|
|
|
+ <if test="checkInTime != null">check_in_time,</if>
|
|
|
+ <if test="checkOutTime != null">check_out_time,</if>
|
|
|
+ <if test="serviceState != null">service_state,</if>
|
|
|
+ <if test="busyTime != null">busy_time,</if>
|
|
|
+ <if test="idleTime != null">idle_time,</if>
|
|
|
+ <if test="callTime != null">call_time,</if>
|
|
|
+ <if test="hangTime != null">hang_time,</if>
|
|
|
+ <if test="heartState != null">heart_state,</if>
|
|
|
+ <if test="heartTime != null">heart_time,</if>
|
|
|
+ <if test="sessionId != null and sessionId != ''">session_id,</if>
|
|
|
+ <if test="isDelete != null">is_delete,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="saasId != null and saasId != ''">#{saasId},</if>
|
|
|
+ <if test="agentNum != null and agentNum != ''">#{agentNum},</if>
|
|
|
+ <if test="outId != null and outId != ''">#{outId},</if>
|
|
|
+ <if test="identityType != null">#{identityType},</if>
|
|
|
+ <if test="checkState != null">#{checkState},</if>
|
|
|
+ <if test="checkScene != null and checkScene != ''">#{checkScene},</if>
|
|
|
+ <if test="checkInTime != null">#{checkInTime},</if>
|
|
|
+ <if test="checkOutTime != null">#{checkOutTime},</if>
|
|
|
+ <if test="serviceState != null">#{serviceState},</if>
|
|
|
+ <if test="busyTime != null">#{busyTime},</if>
|
|
|
+ <if test="idleTime != null">#{idleTime},</if>
|
|
|
+ <if test="callTime != null">#{callTime},</if>
|
|
|
+ <if test="hangTime != null">#{hangTime},</if>
|
|
|
+ <if test="heartState != null">#{heartState},</if>
|
|
|
+ <if test="heartTime != null">#{heartTime},</if>
|
|
|
+ <if test="sessionId != null and sessionId != ''">#{sessionId},</if>
|
|
|
+ <if test="isDelete != null">#{isDelete},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateCAgentMonitor" parameterType="CAgentMonitor">
|
|
|
+ update c_agent_monitor
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="saasId != null and saasId != ''">saas_id = #{saasId},</if>
|
|
|
+ <if test="agentNum != null and agentNum != ''">agent_num = #{agentNum},</if>
|
|
|
+ <if test="outId != null and outId != ''">out_id = #{outId},</if>
|
|
|
+ <if test="identityType != null">identity_type = #{identityType},</if>
|
|
|
+ <if test="checkState != null">check_state = #{checkState},</if>
|
|
|
+ <if test="checkScene != null and checkScene != ''">check_scene = #{checkScene},</if>
|
|
|
+ <if test="checkInTime != null">check_in_time = #{checkInTime},</if>
|
|
|
+ <if test="checkOutTime != null">check_out_time = #{checkOutTime},</if>
|
|
|
+ <if test="serviceState != null">service_state = #{serviceState},</if>
|
|
|
+ <if test="busyTime != null">busy_time = #{busyTime},</if>
|
|
|
+ <if test="idleTime != null">idle_time = #{idleTime},</if>
|
|
|
+ <if test="callTime != null">call_time = #{callTime},</if>
|
|
|
+ <if test="hangTime != null">hang_time = #{hangTime},</if>
|
|
|
+ <if test="heartState != null">heart_state = #{heartState},</if>
|
|
|
+ <if test="heartTime != null">heart_time = #{heartTime},</if>
|
|
|
+ <if test="sessionId != null and sessionId != ''">session_id = #{sessionId},</if>
|
|
|
+ <if test="isDelete != null">is_delete = #{isDelete},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ </trim>
|
|
|
+ ,revision = revision + 1
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <delete id="deleteCAgentMonitorById" parameterType="String">
|
|
|
+ update c_agent_monitor set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteCAgentMonitorByIds" parameterType="String">
|
|
|
+ update c_agent_monitor set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|