apache / shardingsphere-example

Sharding-Sphere examples
Apache License 2.0
974 stars 731 forks source link

主键赋值错误,或者未赋值 #181

Closed hanxuewen closed 5 years ago

hanxuewen commented 5 years ago

spring-datasource配置:

`

123 10 ` Mybaits: ` SELECT LAST_INSERT_ID() insert into ec_order (order_no, member_id, member_name, source, order_type, order_total_price, actually_pay_price, goods_total_price, freight_price, activity_price, is_use_coupon, is_invoice, order_status, pay_status, is_split, user_remark, order_remark, is_admin_order, order_time, pay_time, return_type, payment, ip_address, is_logistic ) values (#{orderNo,jdbcType=VARCHAR}, #{memberId,jdbcType=BIGINT}, #{memberName,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{orderType,jdbcType=INTEGER}, #{orderTotalPrice,jdbcType=DOUBLE}, #{actuallyPayPrice,jdbcType=DOUBLE}, #{goodsTotalPrice,jdbcType=DOUBLE}, #{freightPrice,jdbcType=DOUBLE}, #{activityPrice,jdbcType=DOUBLE}, #{isUseCoupon,jdbcType=INTEGER}, #{isInvoice,jdbcType=INTEGER}, #{orderStatus,jdbcType=INTEGER}, #{payStatus,jdbcType=INTEGER}, #{isSplit,jdbcType=INTEGER}, #{userRemark,jdbcType=VARCHAR}, #{orderRemark,jdbcType=VARCHAR}, #{isAdminOrder,jdbcType=INTEGER}, #{orderTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, #{returnType,jdbcType=INTEGER}, #{payment,jdbcType=INTEGER}, #{ipAddress,jdbcType=VARCHAR}, #{isLogistic,jdbcType=INTEGER} ) ` 没有自动追加ID,但是却把ID赋值到了别的字段:is_admin_order了 但是如果我把mybaits的insert SQL追加上ID,就不会赋值错误,但是ID也没有值,插入导数据库用的是mysql的自增值 这个问题该如何处理
hanxuewen commented 5 years ago

upgrade 4.0.0.0-RC2

terrymanu commented 4 years ago

For English only