select id,
               sub_id,
               targetid,
               answerps,
               scriptid,
               extemplate_text,
               comment,
               patid,
               taskid,
               uuid,
               guid,
               phone,
               operate,
               displayno,
               inbound,
               incoming,
               assigntime,
               starttime,
               answertime,
               silent,
               dtmf_key,
               musicpath,
               sent_index,
               sent_begin,
               asrtext,
               begin_time,
               end_time,
               sent_end,
               recordpath,
               recordurl,
               templateid,
               templatequestionnum,
               switchid,
               questiontext,
               questionvoice,
               categoryname,
               targetoptions,
               targetvalue,
               matchedtext,
               addtime,
               isupload,
               upload_time,
               orgid,
               create_time,
               del_flag,
               update_by,
               update_time,
               value_type,
               create_by
        from service_subtask_detail
    
    
    
    
        insert into service_subtask_detail
        
            id,
            sub_id,
            targetid,
            taskid,
            uuid,
            phone,
            operate,
            displayno,
            inbound,
            incoming,
            assigntime,
            starttime,
            answertime,
            silent,
            dtmf_key,
            musicpath,
            sent_index,
            sent_begin,
            asrtext,
            begin_time,
            end_time,
            sent_end,
            recordpath,
            recordurl,
            templateid,
            templatequestionnum,
            switchid,
            questiontext,
            questionvoice,
            categoryname,
            targetoptions,
            targetvalue,
            matchedtext,
            addtime,
            isupload,
            upload_time,
            orgid,
            create_time,
            del_flag,
            update_by,
            update_time,
            create_by,
            value_type,
            answerps,
            comment,
            scriptid,
            patid,
            extemplate_text,
            guid,
        
        
            #{id},
            #{subId},
            #{targetid},
            #{taskid},
            #{uuid},
            #{phone},
            #{operate},
            #{displayno},
            #{inbound},
            #{incoming},
            #{assigntime},
            #{starttime},
            #{answertime},
            #{silent},
            #{dtmfKey},
            #{musicpath},
            #{sentIndex},
            #{sentBegin},
            #{asrtext},
            #{beginTime},
            #{endTime},
            #{sentEnd},
            #{recordpath},
            #{recordurl},
            #{templateid},
            #{templatequestionnum},
            #{switchid},
            #{questiontext},
            #{questionvoice},
            #{categoryname},
            #{targetoptions},
            #{targetvalue},
            #{matchedtext},
            #{addtime},
            #{isupload},
            #{uploadTime},
            #{orgid},
            #{createTime},
            #{delFlag},
            #{updateBy},
            #{updateTime},
            #{createBy},
            #{valueType},
            #{answerps},
            #{comment},
            #{scriptid},
            #{patid},
            #{extemplateText},
            #{guid},
        
    
    
        update service_subtask_detail
        
            sub_id = #{subId},
            taskid = #{taskid},
            targetid = #{targetid},
            uuid = #{uuid},
            phone = #{phone},
            operate = #{operate},
            displayno = #{displayno},
            inbound = #{inbound},
            incoming = #{incoming},
            assigntime = #{assigntime},
            starttime = #{starttime},
            answertime = #{answertime},
            silent = #{silent},
            dtmf_key = #{dtmfKey},
            musicpath = #{musicpath},
            sent_index = #{sentIndex},
            sent_begin = #{sentBegin},
            asrtext = #{asrtext},
            begin_time = #{beginTime},
            end_time = #{endTime},
            sent_end = #{sentEnd},
            recordpath = #{recordpath},
            recordurl = #{recordurl},
            templateid = #{templateid},
            templatequestionnum = #{templatequestionnum},
            switchid = #{switchid},
            questiontext = #{questiontext},
            questionvoice = #{questionvoice},
            categoryname = #{categoryname},
            targetoptions = #{targetoptions},
            targetvalue = #{targetvalue},
            matchedtext = #{matchedtext},
            addtime = #{addtime},
            isupload = #{isupload},
            upload_time = #{uploadTime},
            orgid = #{orgid},
            create_time = #{createTime},
            del_flag = #{delFlag},
            update_by = #{updateBy},
            update_time = #{updateTime},
            create_by = #{createBy},
            value_type = #{valueType},
            answerps = #{answerps},
            comment = #{comment},
            scriptid = #{scriptid},
            patid = #{patid},
            extemplate_text = #{extemplateText},
            guid = #{guid},
        
        where id = #{id}
    
    
        update service_subtask_detail
        
            sub_id = #{subId},
            taskid = #{taskid},
            targetid = #{targetid},
            uuid = #{uuid},
            phone = #{phone},
            operate = #{operate},
            displayno = #{displayno},
            inbound = #{inbound},
            incoming = #{incoming},
            assigntime = #{assigntime},
            starttime = #{starttime},
            answertime = #{answertime},
            silent = #{silent},
            dtmf_key = #{dtmfKey},
            musicpath = #{musicpath},
            sent_index = #{sentIndex},
            sent_begin = #{sentBegin},
            asrtext = #{asrtext},
            begin_time = #{beginTime},
            end_time = #{endTime},
            sent_end = #{sentEnd},
            recordpath = #{recordpath},
            recordurl = #{recordurl},
            templateid = #{templateid},
            templatequestionnum = #{templatequestionnum},
            switchid = #{switchid},
            questiontext = #{questiontext},
            questionvoice = #{questionvoice},
            categoryname = #{categoryname},
            targetoptions = #{targetoptions},
            targetvalue = #{targetvalue},
            matchedtext = #{matchedtext},
            addtime = #{addtime},
            isupload = #{isupload},
            upload_time = #{uploadTime},
            orgid = #{orgid},
            create_time = #{createTime},
            del_flag = #{delFlag},
            update_by = #{updateBy},
            update_time = #{updateTime},
            create_by = #{createBy},
            value_type = #{valueType},
            answerps = #{answerps},
            comment = #{comment},
            scriptid = #{scriptid},
            patid = #{patid},
            extemplate_text = #{extemplateText},
            guid = #{guid},
        
        where patid = #{patid} and scriptid = #{scriptid} and sub_id = #{subId}
    
    
        delete
        from service_subtask_detail
        where id = #{id}
    
    
        delete from service_subtask_detail where id in
        
            #{id}