id, moments_id, pic, create_time SELECT LAST_INSERT_ID() insert into moments_pic (moments_id, pic, create_time ) values (#{momentsId,jdbcType=INTEGER}, #{pic,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP} ) SELECT LAST_INSERT_ID() insert into moments_pic moments_id, pic, create_time, #{momentsId,jdbcType=INTEGER}, #{pic,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, update moments_pic moments_id = #{momentsId,jdbcType=INTEGER}, pic = #{pic,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, where id = #{id,jdbcType=INTEGER} update moments_pic set moments_id = #{momentsId,jdbcType=INTEGER}, pic = #{pic,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=INTEGER} delete from moments_pic where id = #{id,jdbcType=INTEGER} delete from moments_pic where moments_id = #{momentsId}