[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] mybatis insert 之后id主键自增 插入mock之后没有给id赋值 #573

Open
1 of 2 tasks
scjakehuang opened this issue Oct 8, 2024 · 1 comment
Open
1 of 2 tasks
Assignees
Labels
bug 🐞 Something isn't working

Comments

@scjakehuang
Copy link

Search before asking

  • I have searched the existing issues before asking.

AREX Test Service

AREX Java Agent (arextest/arex-agent-java)

Current Behavior

insert into order_item ( snapshot_id, order_no, buy_count, shop_name, spu_id, sku_id, sku_type, refund_able, auto_approve, item_title, item_description, unit_price, cost_price, item_img_url, item_url, sign_key, project_code, pay_time_limit,product_type,phone_num,created_on, created_by, updated_on, updated_by, item_belong_user_id, item_discount_amount,item_member_discount_amount, item_freight_amount, item_electronic_card_amount, pre_sale, pre_sale_date, item_balance_amount, unit_points, sku_barCode, supplier_id, supplier_name, stock_date,wx_shop_product_id,wx_shop_sku_id,platform_id,platform_supplier_price, item_use_integral, item_integral_deduct_amount, business_goods_id, commission_snapshot, ori_unit_price, ticket_distributor_id, ticket_distributor_name, crossed_price ) values (#{item.snapshotId,jdbcType=VARCHAR}, #{item.orderNo,jdbcType=VARCHAR}, #{item.buyCount,jdbcType=INTEGER}, #{item.shopName,jdbcType=VARCHAR}, #{item.spuId,jdbcType=VARCHAR}, #{item.skuId,jdbcType=VARCHAR}, #{item.skuType,jdbcType=VARCHAR}, #{item.refundAble,jdbcType=VARCHAR}, #{item.autoApprove,jdbcType=INTEGER}, #{item.itemTitle,jdbcType=VARCHAR}, #{item.itemDescription,jdbcType=VARCHAR}, #{item.unitPrice,jdbcType=DECIMAL},#{item.costPrice,jdbcType=DECIMAL}, #{item.itemImgUrl,jdbcType=VARCHAR}, #{item.itemUrl,jdbcType=VARCHAR}, #{item.signKey,jdbcType=VARCHAR}, #{item.projectCode,jdbcType=VARCHAR}, #{item.payTimeLimit,jdbcType=INTEGER}, #{item.productType,jdbcType=VARCHAR}, #{item.phoneNum,jdbcType=VARCHAR}, #{item.createdOn,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=VARCHAR}, #{item.updatedOn,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=VARCHAR}, #{item.itemBelongUserId,jdbcType=VARCHAR}, #{item.itemDiscountAmount,jdbcType=DECIMAL}, #{item.itemMemberDiscountAmount,jdbcType=DECIMAL}, #{item.itemFreightAmount,jdbcType=DECIMAL}, #{item.itemElectronicCardAmount}, #{item.preSale,jdbcType=INTEGER}, #{item.preSaleDate,jdbcType=TIMESTAMP}, #{item.itemBalanceAmount}, #{item.unitPoints}, #{item.skuBarCode}, #{item.supplierId}, #{item.supplierName}, #{item.stockDate},#{item.wxShopProductId},#{item.wxShopSkuId},#{item.platformId},#{item.platformSupplierPrice}, #{item.itemUseIntegral}, #{item.itemIntegralDeductAmount}, #{item.businessGoodsId,jdbcType=VARCHAR}, #{item.commissionSnapshot}, #{item.oriUnitPrice}, #{item.ticketDistributorId}, #{item.ticketDistributorName}, #{item.crossedPrice,jdbcType=DECIMAL} )

Expected Behavior

order_item对象的id字段有自增主键的值,现在是null

Steps To Reproduce

1.插入数据
2.mock数据返回的id值为空

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!
@scjakehuang scjakehuang added the bug 🐞 Something isn't working label Oct 8, 2024
@scjakehuang
Copy link
Author
image insert into order_item ( snapshot_id, order_no, buy_count, shop_name, spu_id, sku_id, sku_type, refund_able, auto_approve, item_title, item_description, unit_price, cost_price, item_img_url, item_url, sign_key, project_code, pay_time_limit,product_type,phone_num,created_on, created_by, updated_on, updated_by, item_belong_user_id, item_discount_amount,item_member_discount_amount, item_freight_amount, item_electronic_card_amount, pre_sale, pre_sale_date, item_balance_amount, unit_points, sku_barCode, supplier_id, supplier_name, stock_date,wx_shop_product_id,wx_shop_sku_id,platform_id,platform_supplier_price, item_use_integral, item_integral_deduct_amount, business_goods_id, commission_snapshot, ori_unit_price, ticket_distributor_id, ticket_distributor_name, crossed_price ) values (#{item.snapshotId,jdbcType=VARCHAR}, #{item.orderNo,jdbcType=VARCHAR}, #{item.buyCount,jdbcType=INTEGER}, #{item.shopName,jdbcType=VARCHAR}, #{item.spuId,jdbcType=VARCHAR}, #{item.skuId,jdbcType=VARCHAR}, #{item.skuType,jdbcType=VARCHAR}, #{item.refundAble,jdbcType=VARCHAR}, #{item.autoApprove,jdbcType=INTEGER}, #{item.itemTitle,jdbcType=VARCHAR}, #{item.itemDescription,jdbcType=VARCHAR}, #{item.unitPrice,jdbcType=DECIMAL},#{item.costPrice,jdbcType=DECIMAL}, #{item.itemImgUrl,jdbcType=VARCHAR}, #{item.itemUrl,jdbcType=VARCHAR}, #{item.signKey,jdbcType=VARCHAR}, #{item.projectCode,jdbcType=VARCHAR}, #{item.payTimeLimit,jdbcType=INTEGER}, #{item.productType,jdbcType=VARCHAR}, #{item.phoneNum,jdbcType=VARCHAR}, #{item.createdOn,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=VARCHAR}, #{item.updatedOn,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=VARCHAR}, #{item.itemBelongUserId,jdbcType=VARCHAR}, #{item.itemDiscountAmount,jdbcType=DECIMAL}, #{item.itemMemberDiscountAmount,jdbcType=DECIMAL}, #{item.itemFreightAmount,jdbcType=DECIMAL}, #{item.itemElectronicCardAmount}, #{item.preSale,jdbcType=INTEGER}, #{item.preSaleDate,jdbcType=TIMESTAMP}, #{item.itemBalanceAmount}, #{item.unitPoints}, #{item.skuBarCode}, #{item.supplierId}, #{item.supplierName}, #{item.stockDate},#{item.wxShopProductId},#{item.wxShopSkuId},#{item.platformId},#{item.platformSupplierPrice}, #{item.itemUseIntegral}, #{item.itemIntegralDeductAmount}, #{item.businessGoodsId,jdbcType=VARCHAR}, #{item.commissionSnapshot}, #{item.oriUnitPrice}, #{item.ticketDistributorId}, #{item.ticketDistributorName}, #{item.crossedPrice,jdbcType=DECIMAL} )
 mybatis版本号
                <dependency>
                    <groupId>org.mybatis</groupId>
                    <artifactId>mybatis</artifactId>
                    <version>3.4.2</version>
                </dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants