(mybatis)There is no getter for property named 'isEffective' in 'class java.lang.String
原来代码:
<select id="findSpecialOffer" resultType="com.lizard.back.model.SpecialOffer" parameterType="java.lang.String">
SELECT
taso.id,
taso.product_id as productId ,
taso.table_name as tableName,
taso.start_time_special_off as startTimeSpecialOff,
taso.end_time_special as endTimeSpecial,
taso.create_time as createTime,
taso.operator,
tau.mobile as mobile,
taso.is_effective as isEffective,
taso.type
FROM
`t_admin_special_offer` taso
INNER JOIN t_admin_user tau ON tau.uid = taso.operator
<if test="isEffective!=null">
where taso.is_effective = #{isEffective,jdbcType=VARCHAR}
</if>
</select>
解决方法: 不管你的参数是什么,都要改成"_parameter"
<select id="findSpecialOffer" resultType="com.lizard.back.model.SpecialOffer" parameterType="java.lang.String">
SELECT
taso.id,
taso.product_id as productId ,
taso.table_name as tableName,
taso.start_time_special_off as startTimeSpecialOff,
taso.end_time_special as endTimeSpecial,
taso.create_time as createTime,
taso.operator,
tau.mobile as mobile,
taso.is_effective as isEffective,
taso.type
FROM
`t_admin_special_offer` taso
INNER JOIN t_admin_user tau ON tau.uid = taso.operator
<if test="_parameter !=null and _parameter !=''">
where taso.is_effective = #{isEffective,jdbcType=VARCHAR}
</if>
</select>
(mybatis)There is no getter for property named 'isEffective' in 'class java.lang.String的更多相关文章
- SSM框架报错分析(一)——There is no getter for property named 'XXX' in 'class java.lang.String'
一.发现问题 <select id="queryStudentByNum" resultType="student" parameterType=&quo ...
- mybatis问题: There is no getter for property named 'equipmentId' in 'class java.lang.String'
本文来源于翁舒航的博客,点击即可跳转原文观看!!!(被转载或者拷贝走的内容可能缺失图片.视频等原文的内容) 若网站将链接屏蔽,可直接拷贝原文链接到地址栏跳转观看,原文链接:https://www.cn ...
- Mybatis异常There is no getter for property named 'XXX' in 'class java.lang.String'
1.当入参为 string类型时 (包括java.lang.String.) 我们使用#{xxx}引入参数.会抛异常There is no getter for property named 'XX ...
- Mybatis异常--There is no getter for property named 'XXX' in 'class java.lang.String'
第一种 在service层加@Param(value="ip") void deleteIpsetup(@Param(value="ip")String ip) ...
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
转载自://http://www.cnblogs.com/anee/p/3324140.html 用mybatis查询时,传入一个字符串传参数,且进行判断时,会报 There is no getter ...
- Mybatis问题:There is no getter for property named 'unitId' in 'class java.lang.String'
Mybatis遇到的问题 问题: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.re ...
- mybatis 异常 There is no getter for property named 'bizId' in 'class java.lang.Long'
mybatis 异常 There is no getter for property named 'bizId' in 'class java.lang.Long' 当使用mybatis进行传参的时候 ...
- mybatis之org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'time' in 'class java.lang.String'
mybatis接口 List<String> getUsedCate(String time); 配置文件 <select id="getUsedCate" pa ...
- Mybatis笔记四:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'id' in 'class java.lang.String'
错误异常:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for pr ...
随机推荐
- 2、按钮:Buttons
/* --- page1.html ---*/ <ion-content padding class="page1"> <h1>基本用法,实体框</h ...
- c# 快速修改图片颜色
public static void ChangeColour(this Bitmap bmp, byte inColourR, byte inColourG, byte inColourB, byt ...
- 【MSDN】 SqlServer DBCC解析
汇总学习下SqlServer的DBCC指令. DBCC:Transact-SQL 编程语言提供 DBCC 语句以作为 SQL Server 的数据库控制台命令. 数据库控制台命令语句可分为以下类别. ...
- Java基础入门 - 简介
官网:https://www.oracle.com Java分为三个体系: JavaEE: Java Platform, Enterprise Edition, Java平台企业版 JavaSE: J ...
- 插入排序——Java实现
一.排序思想 从数组第一个元素开始(0下标),该元素可以认为已经被排序: 取出待排序列中第一个元素,然后从“有序”序列中,从后往前扫描: 如果该元素(有序序列)大于待插入元素(待排序列),将该元素后移 ...
- struts quick start
1.create a dynamic web project 2.import the needed jar(about 11) 3. request page(index.jsp) <%@ p ...
- linux定期任务cron
做个给服务器定期检测的python程序,要python跑起来自己检测时间再执行?我想到了用cron服务. 遇到了个问题python没写绝对路径,没有执行,改了绝对路径就好了.其实人家配置文件开头写了个 ...
- 卸载Gac里被windows installer所reference的assembly的方法
HKEY_LOCAL_MACHINE\Software\Classes\Installer\Assemlies\Global下找到要删除的assembly的那一项, 删除. 然后再gacutil /u ...
- jquery控制滚动条
$(function () { $("table tr td a").css('white-space', 'nowrap'); $("div[id$=ctlScroll ...
- JSTL标签概述
什么是JSTL JSP 标准标记库(JSP Standard Tag Library,JSTL)是一个实现 Web 应用程序中常见的通用功能的定制标记库集,这些功能包括迭代和条件判断.数据管理格式化. ...