comment
comment_id, comment_pid, comment_pname, comment_article_id, comment_author_name,
comment_author_email, comment_author_url, comment_author_avatar, comment_content, comment_agent,
comment_ip, comment_create_time, comment_role, comment_user_id
delete from
where comment_id = #{commentId,jdbcType=INTEGER}
delete from
WHERE comment_user_id = #{userId}
delete from
WHERE comment_article_id = #{articleId}
insert into
(comment_pid, comment_pname, comment_article_id,
comment_author_name, comment_author_email,
comment_author_url, comment_author_avatar, comment_content, comment_agent,
comment_ip, comment_create_time, comment_role, comment_user_id)
values (#{commentPid,jdbcType=INTEGER}, #{commentPname,jdbcType=VARCHAR}, #{commentArticleId,jdbcType=INTEGER},
#{commentAuthorName,jdbcType=VARCHAR}, #{commentAuthorEmail,jdbcType=VARCHAR},
#{commentAuthorUrl,jdbcType=VARCHAR},#{commentAuthorAvatar}, #{commentContent,jdbcType=VARCHAR},
#{commentAgent,jdbcType=VARCHAR},
#{commentIp,jdbcType=VARCHAR}, #{commentCreateTime,jdbcType=TIMESTAMP}, #{commentRole,jdbcType=INTEGER},
#{commentUserId,jdbcType=INTEGER})
update
comment_pid = #{commentPid,jdbcType=INTEGER},
comment_pname = #{commentPname,jdbcType=VARCHAR},
comment_article_id = #{commentArticleId,jdbcType=INTEGER},
comment_author_name = #{commentAuthorName,jdbcType=VARCHAR},
comment_author_email = #{commentAuthorEmail,jdbcType=VARCHAR},
comment_author_url = #{commentAuthorUrl,jdbcType=VARCHAR},
comment_content = #{commentContent,jdbcType=VARCHAR},
comment_agent = #{commentAgent,jdbcType=VARCHAR},
comment_ip = #{commentIp,jdbcType=VARCHAR},
comment_create_time = #{commentCreateTime,jdbcType=TIMESTAMP},
comment_author_avatar = #{commentAuthorAvatar},
comment_role = #{commentRole,jdbcType=INTEGER},
comment_user_id = #{commentUserId,jdbcType=INTEGER},
where comment_id = #{commentId,jdbcType=INTEGER}