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 'a where a.store_id= ''' at line 1,一直找不到id这个是其中文件
删除语句
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 'store_id='3'' at line 20

mybatis的sql语句,求解答
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
5条回答 默认 最新
- 森林西南角的飞鼠哥哥 2015-11-20 07:36关注
楼上说的没错,你没有在方法配置里面加上参数的类型,没法识别你传回来的id
下面是我之前写的一个例子
delete from T_PROJ_HOLIDAY where id in (${id})
${id}里面是我的实体类ProjectHoliday的一个叫id的属性,而像你这样的写法的话,应该写上parameterType="java.lang.String",然后应该就能够识别你的#{id}了本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报