(mybatis)There is no getter for property named 'isEffective' in 'class java.lang.String
2024-09-04 15:55:50
原来代码:
<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>
最新文章
- 探秘Tomcat——连接篇
- Ixia测试仪的自动化
- python Web开发框架-Django (1)
- SignalR与ActiveMQ结合构建实时通信
- 【BZOJ-4548&;3658】小奇的糖果&;Jabberwocky 双向链表 + 树状数组
- 迷你版Deferred
- Thinkpad 笔记本VMware Workstation 安装虚拟机出现&ldquo;此主机支持 Intel VT-x,但 Intel VT-x 处于禁用状态&rdquo;解决方法
- 学习NGUI前的准备NGUI的相关信息
- html ul 里 能放其他标签吗,比如h3、p?
- SQL2000的Enterprise Edition和Developer Edition有什么区别
- JAVA 流式布局管理器
- 自定义控件winfrom
- stat(),lstat(),fstat() 获取文件/目录的相关信息
- node.js报错throw err; // Rethrow non-MySQL errors e:\serverTest\node_modules\mysql\lib\protocol\Parser.js:79 解决方法
- mybatis 模糊查询 like的三种方式
- PythonStudy——PyCharm使用技巧 Column Selection Mode(列选择模式)
- DataGridView属性和事件
- 使用Anemometer基于pt-query-digest将MySQL慢查询可视化
- Android——SeekBar(拖动条)相关知识总结贴
- [转载]CSS各种居中方法