错误如下:

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. day5模块学习--shelve模块

    shelve模块 shelve类似于一个key-value数据库,可以很方便的用来保存Python的内存对象,其内部使用pickle来序列化数据,简单来说,使用者可以将一个列表.字典.或者用户自定义的 ...

  2. scrapy 设置cookie池

    代码已经很详细了,可以直接拿来使用了. 包含了: 从网页获取cookie 存入mongodb 定期删除cookie scrapy中间件对cookie池的取用 #!/usr/bin/python #co ...

  3. linux 101 hacks 第一章cd命令

    本系列来源于<linux 101 hacks>,作者还写了其他101 hacks教程,读了几章,觉得技巧都还不错,很实用,做个总结收藏. cdpath 设置基目录 [ramesh@dev- ...

  4. box-sizing定义的盒模型之间的区别

  5. Deepin Linux安装MySQL方法

    sudo apt-get install mysql-server apt-get install mysql-client sudo apt-get install libmysqlclient-d ...

  6. slf4j logback pom

    pom: <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding&g ...

  7. Dubbo中多注册中心问题与服务分组

    一:注册中心 1.场景 Dubbo 支持同一服务向多注册中心同时注册, 或者不同服务分别注册到不同的注册中心上去, 甚至可以同时引用注册在不同注册中心上的同名服务. 2.多注册中心注册 中文站有些服务 ...

  8. 如何使用django显示一张图片

    django显示图片对新手来说真的算是一个坑.. 这里记录下小白爬坑的历程. 首先,你需要一个可以运行的django服务器,能显示正常的html文本,无法显示图片 这是html的文本,可以显示文字,无 ...

  9. 使用chrales抓包IOS的https(pc+手机)

    1.安装SSL证书到手机 点击 Help -> SSL Proxying -> Install Charles Root Certificate on a Mobile Device 2. ...

  10. annotation中的Autowired

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...