<insert id="insert" parameterType="com.Football.personal.model.FootballOrders" useGeneratedKeys="true" keyProperty="orderId"  keyColumn="order_id">
insert into football_orders (order_id, user_code, order_no,
order_type, pay_amount, trade_status,
pay_status, pay_platform, trade_no,
createTime)
values (#{orderId,jdbcType=BIGINT}, #{userCode,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR},
#{orderType,jdbcType=VARCHAR}, #{payAmount,jdbcType=DECIMAL}, #{tradeStatus,jdbcType=INTEGER},
#{payStatus,jdbcType=INTEGER}, #{payPlatform,jdbcType=VARCHAR}, #{tradeNo,jdbcType=VARCHAR},
#{createtime,jdbcType=TIMESTAMP})
</insert>



主要代码
useGeneratedKeys="true" keyProperty="orderId"  keyColumn="order_id"


maybatis添加数据的时候将自动生成id返回_其他