select id,
               scriptid,
               optiondesc,
               isabnormal,
               warnup,
               warndown,
               picture_path,
               targetID,
               targetType,
               categoryName,
               targetValue,
               basicRegex,
               selfRegex,
               regexUsedType,
               sort,
               version,
               isEnable,
               tipsJson,
               del_flag,
               update_by,
               update_time,
               create_by,
               create_time,
               isupload,
               upload_time,
               orgid,
               pid,
               guid
        from ivr_liba_script_target
    
    
    
    
        insert into ivr_liba_script_target
        
            scriptid,
            targetID,
            targetType,
            categoryName,
            targetValue,
            basicRegex,
            selfRegex,
            regexUsedType,
            sort,
            version,
            isEnable,
            tipsJson,
            del_flag,
            update_by,
            update_time,
            create_by,
            create_time,
            isupload,
            upload_time,
            orgid,
            pid,
            guid,
            optiondesc,
            isabnormal,
            warnup,
            warndown,
            picture_path,
        
        
            #{scriptid},
            #{targetID},
            #{targetType},
            #{categoryName},
            #{targetValue},
            #{basicRegex},
            #{selfRegex},
            #{regexUsedType},
            #{sort},
            #{version},
            #{isEnable},
            #{tipsJson},
            #{delFlag},
            #{updateBy},
            #{updateTime},
            #{createBy},
            #{createTime},
            #{isupload},
            #{uploadTime},
            #{orgid},
            #{pid},
            #{guid},
            #{optiondesc},
            #{isabnormal},
            #{warnup},
            #{warndown},
            #{picturePath},
        
    
    
        update ivr_liba_script_target
        
            scriptid = #{scriptid},
            targetID = #{targetID},
            targetType = #{targetType},
            categoryName = #{categoryName},
            targetValue = #{targetValue},
            basicRegex = #{basicRegex},
            selfRegex = #{selfRegex},
            regexUsedType = #{regexUsedType},
            sort = #{sort},
            version = #{version},
            isEnable = #{isEnable},
            tipsJson = #{tipsJson},
            del_flag = #{delFlag},
            update_by = #{updateBy},
            update_time = #{updateTime},
            create_by = #{createBy},
            create_time = #{createTime},
            isupload = #{isupload},
            upload_time = #{uploadTime},
            orgid = #{orgid},
            pid = #{pid},
            guid = #{guid},
            optiondesc = #{optiondesc},
            isabnormal = #{isabnormal},
            warnup = #{warnup},
            warndown = #{warndown},
            picture_path = #{picturePath},
        
        where id = #{id}
    
    
        update ivr_liba_script_target
        
            del_flag = 1
        
        where id = #{id}