mybaits中获取自增主键的返回值

<insert id="insert" parameterType="pojo.TbFiles" useGeneratedKeys="true" keyProperty="fileId">
  insert into tb_files (file_id, filename, vcode,
  content)
  values (#{fileId,jdbcType=INTEGER}, #{filename,jdbcType=VARCHAR}, #{vcode,jdbcType=VARCHAR},
  #{content,jdbcType=LONGVARCHAR})
  
    
    
  
insert>

你可能感兴趣的:(idea)