select id,
               groupid,
               send_taskid,
               send_taskname,
               score,
               prompt,
               option_no,
               appendflag,
               appenddesc,
               categoryName,
               scriptid,
               templateID,
               targettype,
               targetid,
               targetname,
               targetvalue,
               isabnormal,
               warnup,
               warndown,
               targetregex,
               targetregex2,
               dynamiccruxs,
               nodynamiccruxs,
               optioncontent,
               next_question, language, version, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, picture_path
        from svy_lib_template_targetoption
    
    
    
    
        insert into svy_lib_template_targetoption
        
            groupid,
            categoryName,
            scriptid,
            templateID,
            targettype,
            targetid,
            targetname,
            targetvalue,
            isabnormal,
            warnup,
            warndown,
            targetregex,
            targetregex2,
            dynamiccruxs,
            nodynamiccruxs,
            optioncontent,
            next_question,
            language,
            version,
            del_flag,
            update_by,
            update_time,
            create_by,
            create_time,
            isupload,
            upload_time,
            orgid,
            pid,
            guid,
            picture_path,
            score,
            appendflag,
            appenddesc,
            option_no,
            prompt,
            send_taskid,
            send_taskname,
        
        
            #{groupid},
            #{categoryName},
            #{scriptid},
            #{templateID},
            #{targettype},
            #{targetid},
            #{targetname},
            #{targetvalue},
            #{isabnormal},
            #{warnup},
            #{warndown},
            #{targetregex},
            #{targetregex2},
            #{dynamiccruxsJson},
            #{nodynamiccruxsJson},
            #{optioncontent},
            #{nextQuestion},
            #{language},
            #{version},
            #{delFlag},
            #{updateBy},
            #{updateTime},
            #{createBy},
            #{createTime},
            #{isupload},
            #{uploadTime},
            #{orgid},
            #{pid},
            #{guid},
            #{picturePath},
            #{score},
            #{appendflag},
            #{appenddesc},
            #{optionNo},
            #{prompt},
            #{sendTaskid},
            #{sendTaskname},
        
    
    
        update svy_lib_template_targetoption
        
            groupid = #{groupid},
            categoryName = #{categoryName},
            scriptid = #{scriptid},
            templateID = #{templateID},
            targettype = #{targettype},
            targetid = #{targetid},
            targetname = #{targetname},
            targetvalue = #{targetvalue},
            isabnormal = #{isabnormal},
            warnup = #{warnup},
            warndown = #{warndown},
            targetregex = #{targetregex},
            targetregex2 = #{targetregex2},
            dynamiccruxs = #{dynamiccruxsJson},
            nodynamiccruxs = #{nodynamiccruxsJson},
            optioncontent = #{optioncontent},
            next_question = #{nextQuestion},
            language = #{language},
            version = #{version},
            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},
            picture_path = #{picturePath},
            score = #{score},
            appendflag = #{appendflag},
            appenddesc = #{appenddesc},
            option_no = #{optionNo},
            prompt = #{prompt},
            send_taskid= #{sendTaskid},
            send_taskname = #{sendTaskname},
        
        where id = #{id}
    
    
        update svy_lib_template_targetoption
        set del_flag=1
        where id = #{id}
    
    
        delete from svy_lib_template_targetoption where id in
        
            #{id}