select id,
               tagcategoryid,
               templateid,
               tagid,
               tagname,
               orgid,
               del_flag,
               update_by,
               update_time,
               create_by,
               create_time,
               isupload,
               upload_time,
               pid,
               guid
        from svy_lib_template_tag
    
    
    
    
        insert into svy_lib_template_tag
        
            tagcategoryid,
            templateid,
            tagid,
            tagname,
            orgid,
            del_flag,
            update_by,
            update_time,
            create_by,
            create_time,
            isupload,
            upload_time,
            pid,
            guid,
        
        
            #{tagcategoryid},
            #{templateid},
            #{tagid},
            #{tagname},
            #{orgid},
            #{delFlag},
            #{updateBy},
            #{updateTime},
            #{createBy},
            #{createTime},
            #{isupload},
            #{uploadTime},
            #{pid},
            #{guid},
        
    
    
        update svy_lib_template_tag
        
            tagcategoryid = #{tagcategoryid},
            templateid = #{templateid},
            tagid = #{tagid},
            tagname = #{tagname},
            orgid = #{orgid},
            del_flag = #{delFlag},
            update_by = #{updateBy},
            update_time = #{updateTime},
            create_by = #{createBy},
            create_time = #{createTime},
            isupload = #{isupload},
            upload_time = #{uploadTime},
            pid = #{pid},
            guid = #{guid},
        
        where id = #{id}
    
    
        delete
        from svy_lib_template_tag
        where id = #{id}
    
    
        delete from svy_lib_template_tag where id in
        
            #{id}