错误如下:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named '__frch_item_0' in 'class com.asiacloud.core.model.PageModel'
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:368)
at $Proxy6.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)
at com.asiacloud.core.base.dao.impl.BaseDaoImpl.select(BaseDaoImpl.java:74)
at com.asiacloud.syse.unitaccount.dao.impl.TSyseMaintainAccountDaoImpl.queryListByUnitIdPage(TSyseMaintainAccountDaoImpl.java:107)

Mapper

<select id="queryListByUnitIdPage" parameterType="TSyseMaintainAccount" resultMap="TSyseMaintainAccountResultMap">
select a.*,b.UNIT_NAME linkUnitName from T_SYSE_MAINTAIN_ACCOUNT a
left JOIN T_SYSE_OPER_UNIT b
on a.UNIT_ID=b.ID
where a.STATUS_FLAG in ('1','2')
AND a.UNIT_ID in
<foreach item="item" index="index" collection="params.idList" open="(" separator="," close=")">
#{item}
</foreach>
AND a.ID != #{params.id}
</select>

上面写法错误,注意下面foreach中的值取法,如果取的是List,要用索引来取。

<foreach item="item" index="index" collection="params.idList" open="(" separator="," close=")">
#{params.idList[${index}]}
</foreach>

Mybatis 传入List类型参数,报错:There is no getter for property named '__frch_item_0' in的更多相关文章

  1. Mybatis报错: There is no getter for property named xxx

    在mapper文件中函数的形参上加上注解. 例如: 出现了如下错误:核心错误提示就是There is no getter for property named xxx     ### Error qu ...

  2. MyBatis if test 传入一个数字进行比较报错 There is no getter for property named 'userState' in 'class java.lang.Integer'

    在写MyBatis映射文件中,我要传入一个 int 类型的参数,在映射文件中用 'test' 中进行比较,我花了很长时间百度,发现都是不靠谱的方法,有把数字在比较时转成字符串用 equals 比较的. ...

  3. Mybatis 报错 There is no getter for property named '***' in 'class java.lang.String'

    在mapper.xml中 , 如果单参数是String类型 , 且在sql语句中对参数进行了判断 , 如下 when 中的判断 , 如果出现 if 判断也是一样的.都需要把判断中的参数用 _param ...

  4. mybatis报错,There is no getter for property named 'templateName' in 'class

    There is no getter for property named 'templateName' in 'class 主要原因是因为mapper.xml 的语句有错误,导致在bean里找不到相 ...

  5. 当传入数据只有一个时mybatis中<if>判断会出现There is no getter for property named 'subjectId' in 'class java.lang.Intege

    用"_parameter"代替当前参数 正确: <select id="selectSubjectByPId" parameterType="j ...

  6. MyBatis查询传一个参数时报错:There is no getter for property named 'sleevetype' in 'class java.lang.Integer

    用MyBatis进行查询,传入参数只有一个时(非Map)如int,报错 There is no getter for property named 'sleevetype' in 'class jav ...

  7. 【Mybatis】mybatis查询报错org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'areaName' in 'class java.lang.String'

    mybatis查询报错: Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for pro ...

  8. Python模块学习之xlrd 读取Excel时传入formatting_info=True报错:NotImplementedError: formatting_info=True not yet implemented

    问题:xlrd读取Excel时传入 formatting_info=True 报错 之前我们使用读取xls文件的时候都是使用的xlrd库,但是这个库只能操作 .xls格式,对于后来的 .xlsx的版本 ...

  9. Mybatis查询报错:There is no getter for property named '*' in 'class java.lang.String

    问题: 执行查询时报错:There is no getter for property named '*' in 'class java.lang.String 原因: 传过去的参数为识别.本例为 p ...

随机推荐

  1. Ninject中如果在抽象类中使用了属性注入,则属性必须设置为protected或public

    Ninject中如果在抽象类中使用了属性注入,则属性必须设置为protected或public 不能使用private,否则无法注入成功,会报null异常

  2. day5模块学习--XML模块

    XML文件处理 XML文件处理,有好几种方式,这里介绍一下xml.etree.ElementTree as ET. 注意:xml.etree.ElementTree模块在应对恶意结构数据时显得并不安全 ...

  3. 【BZOJ】1016: [JSOI2008]最小生成树计数

    题解 考虑kruskal 我们都是从边权最小的边开始取,然后连在一起 那我们选出边权最小的一堆边,然后这个图就分成了很多联通块,把每个联通块内部用矩阵树定理算一下生成树个数,再把联通块缩成一个大点,重 ...

  4. 《Android源码设计模式》--策略模式

    No1: 定义:策略模式定义了一系列的算法,并将每一个算法封装起来,而且使它们还可以相互替换.策略模式让算法独立于使用它的客户而独立变化. No2: 使用场景: 1)针对同一类型问题的多种处理方式,仅 ...

  5. OneDrive 开机启动设置失效如何处理?

    问题现象: 『设置里勾选了开机启动onedrive,但是重启电脑勾选就没了,重新勾选没用,一重启就没了』 win10的onedrive无法开机启动 - Microsoft Community 处理方式 ...

  6. 出现报错: module build failed error couldn't find preset es2015 relative to directory

    当用webpack 进行 build 的时候, 会出现如上标题的错误, 解决方式是在 上级 或者 上上级目录,删除 .babelrc 文件

  7. luoguP2303 [SDOI2012]Longge的问题 化式子

    求\(\sum \limits_{i = 1}^n gcd(i, n)\) \(\sum \limits_{i = 1}^n gcd(i, n)\) \(=\sum \limits_{i = 1}^n ...

  8. luogu4595 [COCI2011-2012#5] POPLOCAVANJE 后缀自动机

    看着就像后缀自动机.... 然后搜了一下,网上一大把的\(AC\)自动机 嗯...... 不管了,打一个试试 然后就过了\(QAQ\) 我们考虑对于每个点\(i\)求出它往前最长能匹配的子串的长度 可 ...

  9. CF946D Timetable 动态规划

    预处理出每一行去掉$k$个1能获得的最小代价 之后做一次分组背包$dp$即可 预处理可以选择暴力枚举区间... 复杂度$O(n^3)$ #include <set> #include &l ...

  10. 【转载】利用一个堆溢出漏洞实现 VMware 虚拟机逃逸

    1. 介绍 2017年3月,长亭安全研究实验室(Chaitin Security Research Lab)参加了 Pwn2Own 黑客大赛,我作为团队的一员,一直专注于 VMware Worksta ...