参考:https://blog.csdn.net/czd3355/article/details/71302441
参考:https://blog.csdn.net/isea533/article/details/21153791
查询后发现是mapper文件中selectKey标签的影响
<insert id="insert" parameterType="com.xxx.xxx.bean.OutlandProject">
<selectKey keyProperty="pid" order="AFTER" resultType="java.lang.String">
SELECT LAST_INSERT_ID()
</selectKey>
insert into outland_project (pid, npr, bom, auth)
values (#{pid,jdbcType=VARCHAR},#{npr,jdbcType=VARCHAR}, #{bom,jdbcType=VARCHAR}, #{auth,jdbcType=VARCHAR})
</insert>
selectKey标签中返回主键的类型是String,而insert标签的返回值是int,所以返回的OutlandProject的主键pid变化了
日志如图: