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回答

geelylucky

2019-03-11

亲爱的同学,你好,我是geely老师的助教。

如果解决不了,请加我qq:835683985

1
1
慕码人7211748
非常感谢!
2019-03-13
共1条回复

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9502 学习 · 8820 问题

查看课程