当前使用版本(必填,否则不予处理)

3.5.2

该问题是如何引起的?(确定最新版也有问题再提!!!)

MyBatis-Plus 自定义拦截器后,插入数据的时候替换Expressions导致参数和值的数量不一致 MyBatis-Plus 自定义拦截器后,插入数据的时候替换Expressions导致参数和值的数量不一致 替换了Expressions后出现的

重现步骤(如果有就写完整)

替换了Expressions

报错信息

Could not set parameters for mapping: ParameterMapping{property='compId', mode=IN, javaType=class java.lang.Long, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #11 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 (11 > number of parameters, which is 10).

Comment From: miemieYaho

给出你的复现demo

Comment From: VampireAchao

因为这里的sql已经生成完毕了,所以修改了sql后,其parameterMapping未处理导致的,可参考下之前我写的一个:

https://github.com/apache/incubator-streampark/pull/1493/files

进行手动处理parameterMapping

Comment From: Musll-T

因为这里的sql已经生成完毕了,所以修改了sql后,其parameterMapping未处理导致的,可参考下之前我写的一个:

https://github.com/apache/incubator-streampark/pull/1493/files

进行手动处理parameterMapping

好的,感谢