mybatis-plus报错Caused by: java.sql.SQLException: 无效的列类型: 1111
where column1 in List 你还会写这样的SQL吗?
mybatis-plus用多了,突然不知道怎么写一个where xxx in () 的SQL了,这里记录下
- mapper接口
List<Tbmmd006Entity> getListByProjectNos(@Param("projectNos") List<String> projectNos);
- mapper.xml
<select id="getListByProjectNos" resultType="org.springblade.MMD.entity.Tbmmd006Entity">select * from TBMMD006<where>1=1<if test="projectNos != null and projectNos.size()>0">and PROJECT_NO in<foreach collection="projectNos" item="projectNo" separator="," open="(" close=")">#{projectNo,jdbcType=VARCHAR}</foreach></if></where></select>