update t_help_doc set page_view_count = page_view_count + #{pageViewCountIncrease}, user_view_count = user_view_count + #{userViewCountIncrease} where help_doc_id = #{helpDocId} insert into t_help_doc_relation (relation_id, relation_name, help_doc_id) values ( #{item.relationId} ,#{item.relationName}, #{helpDocId} ) delete from t_help_doc_relation where help_doc_id = #{helpDocId} insert into t_help_doc_view_record (help_doc_id, user_id,user_name, first_ip, first_user_agent, page_view_count) values (#{helpDocId}, #{userId},#{userName}, #{ip}, #{userAgent}, #{pageViewCount}) update t_help_doc_view_record set page_view_count = page_view_count + 1, last_ip = #{ip}, last_user_agent = #{userAgent} where help_doc_id = #{helpDocId} and user_id = #{userId}