提示是insertSelective的错,我从OrderMapper.XML源码复制过来依然报错
Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1
The error may exist in file [E:\myProject\mall\target\classes\mapper\OrderMapper.xml]
The error may involve com.example.mall.dao.OrderMapper.insertSelective-Inline
The error occurred while setting parameters
SQL: insert into mall_order
Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1
我的OrderMapper.XML中的insertSelective代码:
insert into mall_order
id,
order_no,
user_id,
shipping_id,
payment,
payment_type,
postage,
status,
payment_time,
send_time,
end_time,
close_time,
create_time,
update_time,
#{id,jdbcType=INTEGER},
#{orderNo,jdbcType=BIGINT},
#{userId,jdbcType=INTEGER},
#{shippingId,jdbcType=INTEGER},
#{payment,jdbcType=DECIMAL},
#{paymentType,jdbcType=INTEGER},
#{postage,jdbcType=INTEGER},
#{status,jdbcType=INTEGER},
#{paymentTime,jdbcType=TIMESTAMP},
#{sendTime,jdbcType=TIMESTAMP},
#{endTime,jdbcType=TIMESTAMP},
#{closeTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},