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