Pārlūkot izejas kodu

新增尚辉坐席和坐席监控表的基本的增删改查接口

王苗苗 3 dienas atpakaļ
vecāks
revīzija
2442fefc9e

+ 77 - 0
slibra-system/src/main/java/com/slibra/business/domain/CAgent.java

@@ -0,0 +1,77 @@
+package com.slibra.business.domain;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.slibra.common.annotation.Excel;
+import com.slibra.common.core.domain.BaseEntity;
+
+/**
+ * 坐席信息对象 c_agent
+ * 
+ * @author slibra
+ * @date 2024-11-25
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class CAgent
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private String id;
+
+    /** 租户隔离 */
+    @Excel(name = "租户隔离")
+    private String saasId;
+
+    /** 坐席工号 */
+    @Excel(name = "坐席工号")
+    private String agentNum;
+
+    /** 坐席姓名 */
+    @Excel(name = "坐席姓名")
+    private String agentName;
+
+    /** 外部id */
+    @Excel(name = "外部id")
+    private String outId;
+
+    /** 坐席密码 */
+    @Excel(name = "坐席密码")
+    private String agentPwd;
+
+    /** 坐席类型 0:普通坐席 ;1:组长:2:主管 */
+    @Excel(name = "坐席类型 0:普通坐席 ;1:组长:2:主管")
+    private Long agentType;
+
+    /** 分机号 */
+    @Excel(name = "分机号")
+    private String phoneNum;
+
+    /** 分配标志  0:不参与排队;1:参与排队 */
+    @Excel(name = "分配标志  0:不参与排队;1:参与排队")
+    private Long distribute;
+
+    /** 账号状态 0:可用;1:禁用 */
+    @Excel(name = "账号状态 0:可用;1:禁用")
+    private Long agentState;
+
+    /** 身份标识 */
+    @Excel(name = "身份标识")
+    private Long identityType;
+
+    /** 删除标识 */
+    @Excel(name = "删除标识")
+    private Long isDelete;
+
+    /** 用户ID */
+    @Excel(name = "用户ID")
+    private Long userId;
+
+}

+ 106 - 0
slibra-system/src/main/java/com/slibra/business/domain/CAgentMonitor.java

@@ -0,0 +1,106 @@
+package com.slibra.business.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.slibra.common.annotation.Excel;
+import com.slibra.common.core.domain.BaseEntity;
+
+/**
+ * 坐席监控对象 c_agent_monitor
+ * 
+ * @author slibra
+ * @date 2024-11-25
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class CAgentMonitor
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private String id;
+
+    /** 租户隔离 */
+    @Excel(name = "租户隔离")
+    private String saasId;
+
+    /** 坐席工号 */
+    @Excel(name = "坐席工号")
+    private String agentNum;
+
+    /** 外部id */
+    @Excel(name = "外部id")
+    private String outId;
+
+    /** 身份标识 */
+    @Excel(name = "身份标识")
+    private Long identityType;
+
+    /** 是否签入 0:是 1: 否  默认未签入 */
+    @Excel(name = "是否签入 0:是 1: 否  默认未签入")
+    private Long checkState;
+
+    /** 迁入场景 */
+    @Excel(name = "迁入场景")
+    private String checkScene;
+
+    /** 签入时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "签入时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date checkInTime;
+
+    /** 签出时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "签出时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date checkOutTime;
+
+    /** 坐席服务状态 0: 未登录(签出) 1: 置忙 2: 置闲 3: 通话中 4: 后处理 5: 拨号中 */
+    @Excel(name = "坐席服务状态 0: 未登录(签出) 1: 置忙 2: 置闲 3: 通话中 4: 后处理 5: 拨号中")
+    private Long serviceState;
+
+    /** 置忙时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "置忙时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date busyTime;
+
+    /** 置闲时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "置闲时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date idleTime;
+
+    /** 接通时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "接通时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date callTime;
+
+    /** 挂断时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "挂断时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date hangTime;
+
+    /** 心跳状态 0: 默认 1:正常  2: 异常 */
+    @Excel(name = "心跳状态 0: 默认 1:正常  2: 异常")
+    private Long heartState;
+
+    /** 正常心跳时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "正常心跳时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date heartTime;
+
+    /** sessionId */
+    @Excel(name = "sessionId")
+    private String sessionId;
+
+    /** 删除标识 */
+    @Excel(name = "删除标识")
+    private Long isDelete;
+
+}

+ 61 - 0
slibra-system/src/main/java/com/slibra/business/mapper/CAgentMapper.java

@@ -0,0 +1,61 @@
+package com.slibra.business.mapper;
+
+import java.util.List;
+import com.slibra.business.domain.CAgent;
+
+/**
+ * 坐席信息Mapper接口
+ * 
+ * @author slibra
+ * @date 2024-11-25
+ */
+public interface CAgentMapper 
+{
+    /**
+     * 查询坐席信息
+     * 
+     * @param id 坐席信息主键
+     * @return 坐席信息
+     */
+    public CAgent selectCAgentById(String id);
+
+    /**
+     * 查询坐席信息列表
+     * 
+     * @param cAgent 坐席信息
+     * @return 坐席信息集合
+     */
+    public List<CAgent> selectCAgentList(CAgent cAgent);
+
+    /**
+     * 新增坐席信息
+     * 
+     * @param cAgent 坐席信息
+     * @return 结果
+     */
+    public int insertCAgent(CAgent cAgent);
+
+    /**
+     * 修改坐席信息
+     * 
+     * @param cAgent 坐席信息
+     * @return 结果
+     */
+    public int updateCAgent(CAgent cAgent);
+
+    /**
+     * 删除坐席信息
+     * 
+     * @param id 坐席信息主键
+     * @return 结果
+     */
+    public int deleteCAgentById(String id);
+
+    /**
+     * 批量删除坐席信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCAgentByIds(String[] ids);
+}

+ 61 - 0
slibra-system/src/main/java/com/slibra/business/mapper/CAgentMonitorMapper.java

@@ -0,0 +1,61 @@
+package com.slibra.business.mapper;
+
+import java.util.List;
+import com.slibra.business.domain.CAgentMonitor;
+
+/**
+ * 坐席监控Mapper接口
+ * 
+ * @author slibra
+ * @date 2024-11-25
+ */
+public interface CAgentMonitorMapper 
+{
+    /**
+     * 查询坐席监控
+     * 
+     * @param id 坐席监控主键
+     * @return 坐席监控
+     */
+    public CAgentMonitor selectCAgentMonitorById(String id);
+
+    /**
+     * 查询坐席监控列表
+     * 
+     * @param cAgentMonitor 坐席监控
+     * @return 坐席监控集合
+     */
+    public List<CAgentMonitor> selectCAgentMonitorList(CAgentMonitor cAgentMonitor);
+
+    /**
+     * 新增坐席监控
+     * 
+     * @param cAgentMonitor 坐席监控
+     * @return 结果
+     */
+    public int insertCAgentMonitor(CAgentMonitor cAgentMonitor);
+
+    /**
+     * 修改坐席监控
+     * 
+     * @param cAgentMonitor 坐席监控
+     * @return 结果
+     */
+    public int updateCAgentMonitor(CAgentMonitor cAgentMonitor);
+
+    /**
+     * 删除坐席监控
+     * 
+     * @param id 坐席监控主键
+     * @return 结果
+     */
+    public int deleteCAgentMonitorById(String id);
+
+    /**
+     * 批量删除坐席监控
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCAgentMonitorByIds(String[] ids);
+}

+ 61 - 0
slibra-system/src/main/java/com/slibra/business/service/ICAgentMonitorService.java

@@ -0,0 +1,61 @@
+package com.slibra.business.service;
+
+import java.util.List;
+import com.slibra.business.domain.CAgentMonitor;
+
+/**
+ * 坐席监控Service接口
+ * 
+ * @author slibra
+ * @date 2024-11-25
+ */
+public interface ICAgentMonitorService 
+{
+    /**
+     * 查询坐席监控
+     * 
+     * @param id 坐席监控主键
+     * @return 坐席监控
+     */
+    public CAgentMonitor selectCAgentMonitorById(String id);
+
+    /**
+     * 查询坐席监控列表
+     * 
+     * @param cAgentMonitor 坐席监控
+     * @return 坐席监控集合
+     */
+    public List<CAgentMonitor> selectCAgentMonitorList(CAgentMonitor cAgentMonitor);
+
+    /**
+     * 新增坐席监控
+     * 
+     * @param cAgentMonitor 坐席监控
+     * @return 结果
+     */
+    public int insertCAgentMonitor(CAgentMonitor cAgentMonitor);
+
+    /**
+     * 修改坐席监控
+     * 
+     * @param cAgentMonitor 坐席监控
+     * @return 结果
+     */
+    public int updateCAgentMonitor(CAgentMonitor cAgentMonitor);
+
+    /**
+     * 批量删除坐席监控
+     * 
+     * @param ids 需要删除的坐席监控主键集合
+     * @return 结果
+     */
+    public int deleteCAgentMonitorByIds(String[] ids);
+
+    /**
+     * 删除坐席监控信息
+     * 
+     * @param id 坐席监控主键
+     * @return 结果
+     */
+    public int deleteCAgentMonitorById(String id);
+}

+ 61 - 0
slibra-system/src/main/java/com/slibra/business/service/ICAgentService.java

@@ -0,0 +1,61 @@
+package com.slibra.business.service;
+
+import java.util.List;
+import com.slibra.business.domain.CAgent;
+
+/**
+ * 坐席信息Service接口
+ * 
+ * @author slibra
+ * @date 2024-11-25
+ */
+public interface ICAgentService 
+{
+    /**
+     * 查询坐席信息
+     * 
+     * @param id 坐席信息主键
+     * @return 坐席信息
+     */
+    public CAgent selectCAgentById(String id);
+
+    /**
+     * 查询坐席信息列表
+     * 
+     * @param cAgent 坐席信息
+     * @return 坐席信息集合
+     */
+    public List<CAgent> selectCAgentList(CAgent cAgent);
+
+    /**
+     * 新增坐席信息
+     * 
+     * @param cAgent 坐席信息
+     * @return 结果
+     */
+    public int insertCAgent(CAgent cAgent);
+
+    /**
+     * 修改坐席信息
+     * 
+     * @param cAgent 坐席信息
+     * @return 结果
+     */
+    public int updateCAgent(CAgent cAgent);
+
+    /**
+     * 批量删除坐席信息
+     * 
+     * @param ids 需要删除的坐席信息主键集合
+     * @return 结果
+     */
+    public int deleteCAgentByIds(String[] ids);
+
+    /**
+     * 删除坐席信息信息
+     * 
+     * @param id 坐席信息主键
+     * @return 结果
+     */
+    public int deleteCAgentById(String id);
+}

+ 96 - 0
slibra-system/src/main/java/com/slibra/business/service/impl/CAgentMonitorServiceImpl.java

@@ -0,0 +1,96 @@
+package com.slibra.business.service.impl;
+
+import java.util.List;
+import com.slibra.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.slibra.business.mapper.CAgentMonitorMapper;
+import com.slibra.business.domain.CAgentMonitor;
+import com.slibra.business.service.ICAgentMonitorService;
+
+/**
+ * 坐席监控Service业务层处理
+ * 
+ * @author slibra
+ * @date 2024-11-25
+ */
+@Service
+public class CAgentMonitorServiceImpl implements ICAgentMonitorService 
+{
+    @Autowired
+    private CAgentMonitorMapper cAgentMonitorMapper;
+
+    /**
+     * 查询坐席监控
+     * 
+     * @param id 坐席监控主键
+     * @return 坐席监控
+     */
+    @Override
+    public CAgentMonitor selectCAgentMonitorById(String id)
+    {
+        return cAgentMonitorMapper.selectCAgentMonitorById(id);
+    }
+
+    /**
+     * 查询坐席监控列表
+     * 
+     * @param cAgentMonitor 坐席监控
+     * @return 坐席监控
+     */
+    @Override
+    public List<CAgentMonitor> selectCAgentMonitorList(CAgentMonitor cAgentMonitor)
+    {
+        return cAgentMonitorMapper.selectCAgentMonitorList(cAgentMonitor);
+    }
+
+    /**
+     * 新增坐席监控
+     * 
+     * @param cAgentMonitor 坐席监控
+     * @return 结果
+     */
+    @Override
+    public int insertCAgentMonitor(CAgentMonitor cAgentMonitor)
+    {
+        cAgentMonitor.setCreateTime(DateUtils.getNowDate());
+        return cAgentMonitorMapper.insertCAgentMonitor(cAgentMonitor);
+    }
+
+    /**
+     * 修改坐席监控
+     * 
+     * @param cAgentMonitor 坐席监控
+     * @return 结果
+     */
+    @Override
+    public int updateCAgentMonitor(CAgentMonitor cAgentMonitor)
+    {
+        cAgentMonitor.setUpdateTime(DateUtils.getNowDate());
+        return cAgentMonitorMapper.updateCAgentMonitor(cAgentMonitor);
+    }
+
+    /**
+     * 批量删除坐席监控
+     * 
+     * @param ids 需要删除的坐席监控主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCAgentMonitorByIds(String[] ids)
+    {
+        return cAgentMonitorMapper.deleteCAgentMonitorByIds(ids);
+    }
+
+    /**
+     * 删除坐席监控信息
+     * 
+     * @param id 坐席监控主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCAgentMonitorById(String id)
+    {
+        return cAgentMonitorMapper.deleteCAgentMonitorById(id);
+    }
+}

+ 96 - 0
slibra-system/src/main/java/com/slibra/business/service/impl/CAgentServiceImpl.java

@@ -0,0 +1,96 @@
+package com.slibra.business.service.impl;
+
+import java.util.List;
+import com.slibra.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.slibra.business.mapper.CAgentMapper;
+import com.slibra.business.domain.CAgent;
+import com.slibra.business.service.ICAgentService;
+
+/**
+ * 坐席信息Service业务层处理
+ * 
+ * @author slibra
+ * @date 2024-11-25
+ */
+@Service
+public class CAgentServiceImpl implements ICAgentService 
+{
+    @Autowired
+    private CAgentMapper cAgentMapper;
+
+    /**
+     * 查询坐席信息
+     * 
+     * @param id 坐席信息主键
+     * @return 坐席信息
+     */
+    @Override
+    public CAgent selectCAgentById(String id)
+    {
+        return cAgentMapper.selectCAgentById(id);
+    }
+
+    /**
+     * 查询坐席信息列表
+     * 
+     * @param cAgent 坐席信息
+     * @return 坐席信息
+     */
+    @Override
+    public List<CAgent> selectCAgentList(CAgent cAgent)
+    {
+        return cAgentMapper.selectCAgentList(cAgent);
+    }
+
+    /**
+     * 新增坐席信息
+     * 
+     * @param cAgent 坐席信息
+     * @return 结果
+     */
+    @Override
+    public int insertCAgent(CAgent cAgent)
+    {
+        cAgent.setCreateTime(DateUtils.getNowDate());
+        return cAgentMapper.insertCAgent(cAgent);
+    }
+
+    /**
+     * 修改坐席信息
+     * 
+     * @param cAgent 坐席信息
+     * @return 结果
+     */
+    @Override
+    public int updateCAgent(CAgent cAgent)
+    {
+        cAgent.setUpdateTime(DateUtils.getNowDate());
+        return cAgentMapper.updateCAgent(cAgent);
+    }
+
+    /**
+     * 批量删除坐席信息
+     * 
+     * @param ids 需要删除的坐席信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCAgentByIds(String[] ids)
+    {
+        return cAgentMapper.deleteCAgentByIds(ids);
+    }
+
+    /**
+     * 删除坐席信息信息
+     * 
+     * @param id 坐席信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCAgentById(String id)
+    {
+        return cAgentMapper.deleteCAgentById(id);
+    }
+}

+ 124 - 0
slibra-system/src/main/resources/mapper/business/CAgentMapper.xml

@@ -0,0 +1,124 @@
+<?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.CAgentMapper">
+    
+    <resultMap type="CAgent" id="CAgentResult">
+        <result property="id"    column="id"    />
+        <result property="saasId"    column="saas_id"    />
+        <result property="agentNum"    column="agent_num"    />
+        <result property="agentName"    column="agent_name"    />
+        <result property="outId"    column="out_id"    />
+        <result property="agentPwd"    column="agent_pwd"    />
+        <result property="agentType"    column="agent_type"    />
+        <result property="phoneNum"    column="phone_num"    />
+        <result property="distribute"    column="distribute"    />
+        <result property="agentState"    column="agent_state"    />
+        <result property="identityType"    column="identity_type"    />
+        <result property="isDelete"    column="is_delete"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="userId"    column="user_id"    />
+    </resultMap>
+
+    <sql id="selectCAgentVo">
+        select id, saas_id, agent_num, agent_name, out_id, agent_pwd, agent_type, phone_num, distribute, agent_state, identity_type, is_delete, update_time, create_time, user_id from c_agent
+    </sql>
+
+    <select id="selectCAgentList" parameterType="CAgent" resultMap="CAgentResult">
+        <include refid="selectCAgentVo"/>
+        <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="agentName != null  and agentName != ''"> and agent_name like concat('%', #{agentName}, '%')</if>
+            <if test="outId != null  and outId != ''"> and out_id = #{outId}</if>
+            <if test="agentPwd != null  and agentPwd != ''"> and agent_pwd = #{agentPwd}</if>
+            <if test="agentType != null "> and agent_type = #{agentType}</if>
+            <if test="phoneNum != null  and phoneNum != ''"> and phone_num = #{phoneNum}</if>
+            <if test="distribute != null "> and distribute = #{distribute}</if>
+            <if test="agentState != null "> and agent_state = #{agentState}</if>
+            <if test="identityType != null "> and identity_type = #{identityType}</if>
+            <if test="isDelete != null "> and is_delete = #{isDelete}</if>
+            <if test="userId != null "> and user_id = #{userId}</if>
+        </where>
+        and del_flag = 0 order by id desc
+    </select>
+    
+    <select id="selectCAgentById" parameterType="String" resultMap="CAgentResult">
+        <include refid="selectCAgentVo"/>
+        where id = #{id} and del_flag = 0
+    </select>
+        
+    <insert id="insertCAgent" parameterType="CAgent" useGeneratedKeys="true" keyProperty="id">
+        insert into c_agent
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="saasId != null and saasId != ''">saas_id,</if>
+            <if test="agentNum != null and agentNum != ''">agent_num,</if>
+            <if test="agentName != null and agentName != ''">agent_name,</if>
+            <if test="outId != null and outId != ''">out_id,</if>
+            <if test="agentPwd != null and agentPwd != ''">agent_pwd,</if>
+            <if test="agentType != null">agent_type,</if>
+            <if test="phoneNum != null and phoneNum != ''">phone_num,</if>
+            <if test="distribute != null">distribute,</if>
+            <if test="agentState != null">agent_state,</if>
+            <if test="identityType != null">identity_type,</if>
+            <if test="isDelete != null">is_delete,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="userId != null">user_id,</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="agentName != null and agentName != ''">#{agentName},</if>
+            <if test="outId != null and outId != ''">#{outId},</if>
+            <if test="agentPwd != null and agentPwd != ''">#{agentPwd},</if>
+            <if test="agentType != null">#{agentType},</if>
+            <if test="phoneNum != null and phoneNum != ''">#{phoneNum},</if>
+            <if test="distribute != null">#{distribute},</if>
+            <if test="agentState != null">#{agentState},</if>
+            <if test="identityType != null">#{identityType},</if>
+            <if test="isDelete != null">#{isDelete},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="userId != null">#{userId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCAgent" parameterType="CAgent">
+        update c_agent
+        <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="agentName != null and agentName != ''">agent_name = #{agentName},</if>
+            <if test="outId != null and outId != ''">out_id = #{outId},</if>
+            <if test="agentPwd != null and agentPwd != ''">agent_pwd = #{agentPwd},</if>
+            <if test="agentType != null">agent_type = #{agentType},</if>
+            <if test="phoneNum != null and phoneNum != ''">phone_num = #{phoneNum},</if>
+            <if test="distribute != null">distribute = #{distribute},</if>
+            <if test="agentState != null">agent_state = #{agentState},</if>
+            <if test="identityType != null">identity_type = #{identityType},</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>
+            <if test="userId != null">user_id = #{userId},</if>
+        </trim>
+        ,revision = revision + 1
+        where id = #{id}
+    </update>
+
+    
+
+    <delete id="deleteCAgentById" parameterType="String">
+        update c_agent set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
+    </delete>
+
+    <delete id="deleteCAgentByIds" parameterType="String">
+        update c_agent 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>

+ 149 - 0
slibra-system/src/main/resources/mapper/business/CAgentMonitorMapper.xml

@@ -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>