当前位置:网站首页>If in SQL determines the error
If in SQL determines the error
2022-07-18 08:20:00 【Ant HJK】
There is no getter for property named '*' in 'class java.lang.String', The reason why this error occurs , Because mybatis In the face of parameterType="String" Of sql Statement is restricted , If you use <when test="username != null"> When judging such conditions , This error will occur , But today, let's get to the bottom .
Wrong report sql
<select id="queryDiscountInfo" parameterType="java.lang.String" resultType="com.elfsack.service.pos.entity.dto.Promotion">
select
`ID` as id,
`NAME` as name,
`PROMOTION_TYPE` as promotionType,
`CONDITION_USE_TYPE` as conditionUseType,
`PREFERENTIAL_CAP` as preferentialCap
from
T_PROMOTION
where
CONDITION_USE_TYPE = "0"
AND PROMOTION_TYPE in("001","002")
AND PREFERENTIAL_CAP >0
AND ENDTIME IS not NULL
AND DEL_FLAG = "N"
AND USE_STATUS = "1"
<if test="queryTime !=null and queryTime != """ >
AND ENDTIME >= #{queryTime}
</if>
</select>At that time, it was directly if Get rid of it , Later, I read others' blogs and found the reason
Source code analysis There is no getter for property named '*' in 'class java.lang.String_ Silent Wang Er's blog -CSDN Blog https://blog.csdn.net/qing_gee/article/details/47122227 Source code analysis There is no getter for property named '*' in 'class java.lang.String_ Silent Wang Er's blog -CSDN Blog
边栏推荐
- 每日一题·735.行星碰撞·栈模拟
- My first anniversary of creation
- GeoServer complete tutorial
- 337.打家劫舍·动态规划
- Broadcast mechanism in pytoch
- Torch in pytoch Repeat() function parsing
- Refute 'all management without assessment is nonsense'
- 30岁被裁,我想明白的几件事
- Software architecture and design (IV) -- data flow architecture
- 347.前K个高频元素.结构体数组排序
猜你喜欢
随机推荐
Matlab: usage of reading imagedatastore() from dataset
软件架构与设计(二)-----架构模型
Pytorch中的广播机制(Broadcast)
What security risks need to be considered in cloud platforms and infrastructure
每日一题·873.最长的斐波那契子序列的长度.记忆化搜索
Software architecture and design (II) -- Architecture Model
Matlab:数据集读取 imageDatastore() 的用法
概率密度函数中形状参数和尺度参数的区别
软件架构与设计(六)-----层次结构体
Torch in pytoch Unsqueeze() and torch Squeeze() function parsing
李沐动手学深度学习V2-目标检测SSD
Des dizaines de milliards de données compressées à 600 go, tdengine est installé sur la plateforme mobile d'énergie de GCL
347. The first k high-frequency elements Structure array sorting
Matlab:trainingoptions() explain training options in detail
Anhui University store
Matlab calculates the integral of normal function, and the quantile corresponding to the integral
安徽大学标志性建筑
FrameWork源码——Binder 驱动解析
If the scheduled task is based on the framework
每日一题·1217.玩筹码·贪心









