ReceptionRecordingMapper.xml 2.67 KB
<?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.bs.reception.mapper.ReceptionRecordingMapper">

    <resultMap id="ReceptionRecordingResult" type="com.bs.reception.entity.reception.ReceptionRecording">
        <result property="id" column="id" jdbcType="BIGINT"/>
        <result property="machineCode" column="machine_code" jdbcType="VARCHAR"/>
        <result property="filesize" column="filesize" jdbcType="BIGINT"/>
        <result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
        <result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
        <result property="duration" column="duration" jdbcType="BIGINT"/>
        <result property="url" column="url" jdbcType="VARCHAR"/>
        <result property="tfTaskId" column="tf_task_id" jdbcType="VARCHAR"/>
        <result property="qiTaskId" column="qi_task_id" jdbcType="VARCHAR"/>
        <result property="bizInfoId" column="biz_info_id" jdbcType="BIGINT"/>
        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
        <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
        <result property="createById" column="create_by_id" jdbcType="BIGINT"/>
        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
        <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
        <result property="updateById" column="update_by_id" jdbcType="BIGINT"/>
        <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
    </resultMap>

    <sql id="selectReceptionRecording">
        select id,
        machine_code,
        filesize,
        start_time,
        end_time,
        duration,
        url,
        tf_task_id,
        qi_task_id,
        biz_info_id,
        create_time,
        create_by,
        create_by_id,
        update_time,
        update_by,
        update_by_id,
        del_flag
        from reception_recording
    </sql>
  <select id="findNeedCheckList"
          resultType="com.bs.reception.entity.reception.ReceptionRecording">
      SELECT t1.*, t2.*
      FROM reception_recording t1
      INNER JOIN ali_asr_model_res t2
      ON t1.tf_task_id = t2.task_id AND t2.task_status  = 1
      WHERE t1.del_flag = 0
      AND t1.tf_task_id IS NOT NULL
      AND NOT EXISTS (
      SELECT 1
      FROM recording_model_call rmc
      WHERE rmc.recording_id = t1.id
      );

  </select>
    <select id="findByReceptionId"
            resultMap="ReceptionRecordingResult">
        SELECT * FROM reception_recording t1
        WHERE del_flag = 0 AND biz_info_id = #{receptionId}
    </select>

</mapper>