前提条件必须要有主键或者唯一索引 #{id,jdbcType=INTEGER}
<insert id="addArticle" parameterType="com.rui.mall.db.bean.Article">
INSERT into article_manage
(id,title,img_url,content,create_time,is_use,summary,style_type)
VALUES (
#{id,jdbcType=INTEGER},
#{title,jdbcType=VARCHAR},
#{imgUrl,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{isUse,jdbcType=INTEGER},
#{summary,jdbcType=VARCHAR},
#{styleType,jdbcType=INTEGER}
)ON DUPLICATE KEY UPDATE
title = VALUES(title),
img_url = VALUES(img_url),
content = VALUES(content),
summary =VALUES(summary),
style_type = VALUES(style_type)
</insert>