JAVA 批量插入时,未赋值字段,数据库设置默认值无效情况

JAVA 批量插入时,未赋值字段,数据库设置默认值无效情况

*单量插入XML *

<!--新增所有列-->
    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
        insert into wnsc_sales.sales_records
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="creator != null and creator != ''">
                 creator,
            </if>
            <if test="updator != null and updator != ''">
                 updator,
            </if>
            <if test="createTime != null">
                 create_time,
            </if>
            <if test="updateTime != null">
                 update_time,
            </if>
            <if test="orderSn != null and orderSn != ''">
                 order_sn,
            </if>
            <if test="memberId != null">
                 member_id,
            </if>
            <if test="memberName != null and memberName != ''">
                 member_name,
            </if>
            <if test="memberPhone != null and memberPhone != ''">
                 member_phone,
            </if>
            <if test="salesId != null">
                 sales_id,
            </if>
            <if test="salesName != null and salesName != ''">
                 sales_name,
            </if>
            <if test="salesPhone != null and salesPhone != ''">
                 sales_phone,
            </if>
            <if test="skuId != null">
                 sku_id,
            </if>
            <if test="skuName != null and skuName != ''">
                 sku_name
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值