|
|
@@ -0,0 +1,98 @@
|
|
|
+<?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.fs.company.mapper.CompanyVoiceRoboticCallLogMapper">
|
|
|
+
|
|
|
+ <resultMap type="CompanyVoiceRoboticCallLog" id="CompanyVoiceRoboticCallLogResult">
|
|
|
+ <result property="logId" column="log_id" />
|
|
|
+ <result property="roboticId" column="robotic_id" />
|
|
|
+ <result property="callerId" column="caller_id" />
|
|
|
+ <result property="runFunction" column="run_function" />
|
|
|
+ <result property="runTime" column="run_time" />
|
|
|
+ <result property="runParam" column="run_param" />
|
|
|
+ <result property="result" column="result" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectCompanyVoiceRoboticCallLogVo">
|
|
|
+ select log_id, robotic_id, caller_id, wx_client_id, run_function, run_time, run_param, result, status,create_time from company_voice_robotic_call_log
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectCompanyVoiceRoboticCallLogList" parameterType="CompanyVoiceRoboticCallLog" resultMap="CompanyVoiceRoboticCallLogResult">
|
|
|
+ <include refid="selectCompanyVoiceRoboticCallLogVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="roboticId != null "> and robotic_id = #{roboticId}</if>
|
|
|
+ <if test="callerId != null "> and caller_id = #{callerId}</if>
|
|
|
+ <if test="wxClientId != null "> and wx_client_id = #{wxClientId}</if>
|
|
|
+ <if test="runFunction != null and runFunction != ''"> and run_function = #{runFunction}</if>
|
|
|
+ <if test="runTime != null "> and run_time = #{runTime}</if>
|
|
|
+ <if test="runParam != null and runParam != ''"> and run_param = #{runParam}</if>
|
|
|
+ <if test="result != null and result != ''"> and result = #{result}</if>
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
|
+ <if test="createTime != null "> and create_time = #{createTime}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectCompanyVoiceRoboticCallLogByLogId" parameterType="Long" resultMap="CompanyVoiceRoboticCallLogResult">
|
|
|
+ <include refid="selectCompanyVoiceRoboticCallLogVo"/>
|
|
|
+ where log_id = #{logId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertCompanyVoiceRoboticCallLog" parameterType="CompanyVoiceRoboticCallLog" useGeneratedKeys="true" keyProperty="logId">
|
|
|
+ insert into company_voice_robotic_call_log
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="roboticId != null">robotic_id,</if>
|
|
|
+ <if test="callerId != null">caller_id,</if>
|
|
|
+ <if test="wxClientId != null">wx_client_id,</if>
|
|
|
+ <if test="runFunction != null">run_function,</if>
|
|
|
+ <if test="runTime != null">run_time,</if>
|
|
|
+ <if test="runParam != null">run_param,</if>
|
|
|
+ <if test="result != null">result,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="roboticId != null">#{roboticId},</if>
|
|
|
+ <if test="callerId != null">#{callerId},</if>
|
|
|
+ <if test="wxClientId != null">#{wxClientId},</if>
|
|
|
+ <if test="runFunction != null">#{runFunction},</if>
|
|
|
+ <if test="runTime != null">#{runTime},</if>
|
|
|
+ <if test="runParam != null">#{runParam},</if>
|
|
|
+ <if test="result != null">#{result},</if>
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateCompanyVoiceRoboticCallLog" parameterType="CompanyVoiceRoboticCallLog">
|
|
|
+ update company_voice_robotic_call_log
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="roboticId != null">robotic_id = #{roboticId},</if>
|
|
|
+ <if test="callerId != null">caller_id = #{callerId},</if>
|
|
|
+ <if test="wxClientId != null">wx_client_id = #{wxClientId},</if>
|
|
|
+ <if test="runFunction != null">run_function = #{runFunction},</if>
|
|
|
+ <if test="runTime != null">run_time = #{runTime},</if>
|
|
|
+ <if test="runParam != null">run_param = #{runParam},</if>
|
|
|
+ <if test="result != null">result = #{result},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ </trim>
|
|
|
+ where log_id = #{logId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteCompanyVoiceRoboticCallLogByLogId" parameterType="Long">
|
|
|
+ delete from company_voice_robotic_call_log where log_id = #{logId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteCompanyVoiceRoboticCallLogByLogIds" parameterType="String">
|
|
|
+ delete from company_voice_robotic_call_log where log_id in
|
|
|
+ <foreach item="logId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{logId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <select id="selectNoResultLogByCallees" parameterType="com.fs.company.domain.CompanyVoiceRoboticCallees" resultType="CompanyVoiceRoboticCallLog">
|
|
|
+ select * from company_voice_robotic_call_log where robotic_id = #{callees.roboticId} And caller_id = #{callees.id} And status = 1
|
|
|
+ </select>
|
|
|
+</mapper>
|