确认
- [X] 我的版本是最新版本, 我的版本号与 version 相同, 并且项目里无依赖冲突
- [X] 我已经在 issue 中搜索过, 确认问题没有被提出过
- [X] 我已经修改标题, 将标题中的 描述 替换为遇到的问题
当前程序版本
3.5.7
问题描述
在使用setDecrBy()时,参数传负数,DataPermissionInterceptor的beforePrepare方法会将sql修改,
例如UPDATE wms_stock SET qty=qty--230 where id = ? 会改成 UPDATE wms_stock SET qty=qty导致报错
详细堆栈日志
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='ew.paramNameValuePairs.MPGENVAL1', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).