500 Internal Server Error,pay.do
来源:12-6 订单管理模块所有功能自测
慕码人7211748
2019-03-11
对比老师代码的运行结果多了个逗号,明明ProductMapper.xml都一样,为什么会这样??
老师的
我的
一样的xml
update mmall_product
category_id = #{categoryId,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
subtitle = #{subtitle,jdbcType=VARCHAR},
main_image = #{mainImage,jdbcType=VARCHAR},
sub_images = #{subImages,jdbcType=VARCHAR},
detail = #{detail,jdbcType=VARCHAR},
price = #{price,jdbcType=DECIMAL},
stock = #{stock,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = now(),
update_time = now(),老师这边有逗号,我有没有都报错
where id = #{id,jdbcType=INTEGER}
Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 ‘where id = 28’ at line 33
The error may involve com.mmall.dao.ProductMapper.updateByPrimaryKeySelective-Inline
The error occurred while setting parameters
SQL: update mmall_product SET category_id = ?, name = ?, subtitle = ?, main_image = ?, sub_images = ?, detail = ?, price = ?, stock = ?, status = ?, create_time = ?, update_time = now(), where id = ?
写回答
1回答
-
亲爱的同学,你好,我是geely老师的助教。
如果解决不了,请加我qq:835683985
112019-03-13
相似问题