|
|
@@ -0,0 +1,163 @@
|
|
|
+<?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.doctor.mapper.FsDoctorVoiceLogsMapper">
|
|
|
+
|
|
|
+ <resultMap type="FsDoctorVoiceLogs" id="FsDoctorVoiceLogsResult">
|
|
|
+ <result property="voiceId" column="voice_id" />
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
+ <result property="voiceTitle" column="voice_title" />
|
|
|
+ <result property="voiceUrl" column="voice_url" />
|
|
|
+ <result property="startTime" column="start_time" />
|
|
|
+ <result property="finishTime" column="finish_time" />
|
|
|
+ <result property="voiceType" column="voice_type" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="callerPhone" column="caller_phone" />
|
|
|
+ <result property="calleePhone" column="callee_phone" />
|
|
|
+ <result property="times" column="times" />
|
|
|
+ <result property="billingTime" column="billing_time" />
|
|
|
+ <result property="displayCallerNumber" column="display_caller_number" />
|
|
|
+ <result property="displayCalleeNumber" column="display_callee_number" />
|
|
|
+ <result property="doctorId" column="doctor_id" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="sessionId" column="session_id" />
|
|
|
+ <result property="patientId" column="patient_id" />
|
|
|
+ <result property="apiId" column="api_id" />
|
|
|
+ <result property="callerNo" column="caller_no" />
|
|
|
+ <result property="patientName" column="patient_name" />
|
|
|
+ <result property="doctorName" column="doctor_name" />
|
|
|
+ <result property="companyName" column="company_name" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFsDoctorVoiceLogsVo">
|
|
|
+ select voice_id, company_id, voice_title, voice_url, start_time, finish_time, voice_type, remark, caller_phone, callee_phone, times, billing_time,
|
|
|
+ display_caller_number, display_callee_number, doctor_id, status, session_id, patient_id, api_id, caller_no,patient_name,doctor_name,
|
|
|
+ company_name from fs_doctor_voice_logs
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectFsDoctorVoiceLogsList" parameterType="FsDoctorVoiceLogs" resultMap="FsDoctorVoiceLogsResult">
|
|
|
+ <include refid="selectFsDoctorVoiceLogsVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
+ <if test="voiceTitle != null and voiceTitle != ''"> and voice_title = #{voiceTitle}</if>
|
|
|
+ <if test="voiceUrl != null and voiceUrl != ''"> and voice_url = #{voiceUrl}</if>
|
|
|
+ <if test="startTime != null "> and start_time = #{startTime}</if>
|
|
|
+ <if test="finishTime != null "> and finish_time = #{finishTime}</if>
|
|
|
+ <if test="voiceType != null "> and voice_type = #{voiceType}</if>
|
|
|
+ <if test="callerPhone != null and callerPhone != ''"> and caller_phone = #{callerPhone}</if>
|
|
|
+ <if test="calleePhone != null and calleePhone != ''"> and callee_phone = #{calleePhone}</if>
|
|
|
+ <if test="times != null "> and times = #{times}</if>
|
|
|
+ <if test="billingTime != null "> and billing_time = #{billingTime}</if>
|
|
|
+ <if test="displayCallerNumber != null and displayCallerNumber != ''"> and display_caller_number = #{displayCallerNumber}</if>
|
|
|
+ <if test="displayCalleeNumber != null and displayCalleeNumber != ''"> and display_callee_number = #{displayCalleeNumber}</if>
|
|
|
+ <if test="doctorId != null "> and doctor_id = #{doctorId}</if>
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
|
+ <if test="sessionId != null and sessionId != ''"> and session_id = #{sessionId}</if>
|
|
|
+ <if test="patientId != null "> and patient_id = #{patientId}</if>
|
|
|
+ <if test="apiId != null "> and api_id = #{apiId}</if>
|
|
|
+ <if test="callerNo != null and callerNo != ''"> and caller_no = #{callerNo}</if>
|
|
|
+ <if test="patientName != null and patientName != ''"> and patient_name like '%${patientName}%'</if>
|
|
|
+ <if test="doctorName != null and doctorName != ''"> and doctor_name like '%${doctorName}%'</if>
|
|
|
+ <if test="companyName != null and companyName != ''"> and company_name like '%${companyName}%'</if>
|
|
|
+ </where>
|
|
|
+ order by voice_id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFsDoctorVoiceLogsByVoiceId" parameterType="Long" resultMap="FsDoctorVoiceLogsResult">
|
|
|
+ <include refid="selectFsDoctorVoiceLogsVo"/>
|
|
|
+ where voice_id = #{voiceId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertFsDoctorVoiceLogs" parameterType="FsDoctorVoiceLogs" useGeneratedKeys="true" keyProperty="voiceId">
|
|
|
+ insert into fs_doctor_voice_logs
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="companyId != null">company_id,</if>
|
|
|
+ <if test="voiceTitle != null">voice_title,</if>
|
|
|
+ <if test="voiceUrl != null">voice_url,</if>
|
|
|
+ <if test="startTime != null">start_time,</if>
|
|
|
+ <if test="finishTime != null">finish_time,</if>
|
|
|
+ <if test="voiceType != null">voice_type,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="callerPhone != null">caller_phone,</if>
|
|
|
+ <if test="calleePhone != null">callee_phone,</if>
|
|
|
+ <if test="times != null">times,</if>
|
|
|
+ <if test="billingTime != null">billing_time,</if>
|
|
|
+ <if test="displayCallerNumber != null">display_caller_number,</if>
|
|
|
+ <if test="displayCalleeNumber != null">display_callee_number,</if>
|
|
|
+ <if test="doctorId != null">doctor_id,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="sessionId != null">session_id,</if>
|
|
|
+ <if test="patientId != null">patient_id,</if>
|
|
|
+ <if test="apiId != null">api_id,</if>
|
|
|
+ <if test="callerNo != null">caller_no,</if>
|
|
|
+ <if test="patientName != null">patient_name,</if>
|
|
|
+ <if test="doctorName != null">doctor_name,</if>
|
|
|
+ <if test="companyName != null">company_name,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="companyId != null">#{companyId},</if>
|
|
|
+ <if test="voiceTitle != null">#{voiceTitle},</if>
|
|
|
+ <if test="voiceUrl != null">#{voiceUrl},</if>
|
|
|
+ <if test="startTime != null">#{startTime},</if>
|
|
|
+ <if test="finishTime != null">#{finishTime},</if>
|
|
|
+ <if test="voiceType != null">#{voiceType},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="callerPhone != null">#{callerPhone},</if>
|
|
|
+ <if test="calleePhone != null">#{calleePhone},</if>
|
|
|
+ <if test="times != null">#{times},</if>
|
|
|
+ <if test="billingTime != null">#{billingTime},</if>
|
|
|
+ <if test="displayCallerNumber != null">#{displayCallerNumber},</if>
|
|
|
+ <if test="displayCalleeNumber != null">#{displayCalleeNumber},</if>
|
|
|
+ <if test="doctorId != null">#{doctorId},</if>
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
+ <if test="sessionId != null">#{sessionId},</if>
|
|
|
+ <if test="patientId != null">#{patientId},</if>
|
|
|
+ <if test="apiId != null">#{apiId},</if>
|
|
|
+ <if test="callerNo != null">#{callerNo},</if>
|
|
|
+ <if test="patientName != null">#{patientName},</if>
|
|
|
+ <if test="doctorName != null">#{doctorName},</if>
|
|
|
+ <if test="companyName != null">#{companyName},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateFsDoctorVoiceLogs" parameterType="FsDoctorVoiceLogs">
|
|
|
+ update fs_doctor_voice_logs
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="companyId != null">company_id = #{companyId},</if>
|
|
|
+ <if test="voiceTitle != null">voice_title = #{voiceTitle},</if>
|
|
|
+ <if test="voiceUrl != null">voice_url = #{voiceUrl},</if>
|
|
|
+ <if test="startTime != null">start_time = #{startTime},</if>
|
|
|
+ <if test="finishTime != null">finish_time = #{finishTime},</if>
|
|
|
+ <if test="voiceType != null">voice_type = #{voiceType},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="callerPhone != null">caller_phone = #{callerPhone},</if>
|
|
|
+ <if test="calleePhone != null">callee_phone = #{calleePhone},</if>
|
|
|
+ <if test="times != null">times = #{times},</if>
|
|
|
+ <if test="billingTime != null">billing_time = #{billingTime},</if>
|
|
|
+ <if test="displayCallerNumber != null">display_caller_number = #{displayCallerNumber},</if>
|
|
|
+ <if test="displayCalleeNumber != null">display_callee_number = #{displayCalleeNumber},</if>
|
|
|
+ <if test="doctorId != null">doctor_id = #{doctorId},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="sessionId != null">session_id = #{sessionId},</if>
|
|
|
+ <if test="patientId != null">patient_id = #{patientId},</if>
|
|
|
+ <if test="apiId != null">api_id = #{apiId},</if>
|
|
|
+ <if test="callerNo != null">caller_no = #{callerNo},</if>
|
|
|
+ <if test="patientName != null">patient_name = #{patientName},</if>
|
|
|
+ <if test="doctorName != null">doctor_name = #{doctorName},</if>
|
|
|
+ <if test="companyName != null">company_name = #{companyName},</if>
|
|
|
+ </trim>
|
|
|
+ where voice_id = #{voiceId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteFsDoctorVoiceLogsByVoiceId" parameterType="Long">
|
|
|
+ delete from fs_doctor_voice_logs where voice_id = #{voiceId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteFsDoctorVoiceLogsByVoiceIds" parameterType="String">
|
|
|
+ delete from fs_doctor_voice_logs where voice_id in
|
|
|
+ <foreach item="voiceId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{voiceId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|