<?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.tofly.xrtygis.callCenterMapper.BusiAutocallData1000Mapper">

    <insert id="insertBusiAutocallData">
        INSERT INTO busi_autocall_data1000 (phone_no,TTS_text) VALUES (#{phoneNo},#{ttsText});
    </insert>

    <update id="updateBusiAutocallData">
        UPDATE busi_autocall_data1000
        SET TTS_text = #{ttsText}, STATE = 0, CALL_RESULT = NULL
        WHERE phone_no = #{phoneNo}
    </update>

    <select id="selectCallInfo" resultType="map">
        select  *
        from busi_autocall_data1000
        WHERE
            1=1
        <if test="phoneNo != null and phoneNo.trim() != ''">
            AND PHONE_NO = #{phoneNo}
        </if>
        <if test="state != null">
            AND STATE = #{state}
        </if>
    </select>
</mapper>
