LambdaQueryWrapper
解决拼接条件表达式时候,数据库字段名写错导致异常的问题
代码范例
LambdaQueryWrapper<AlarmRuleNew> alarmRuleNewLambdaQueryWrapper = new LambdaQueryWrapper<AlarmRuleNew>();
// 写表达式时,直接用::形式获取对应的字段名
alarmRuleNewLambdaQueryWrapper.eq(AlarmRuleNew::getRuleKey,"3");
List<AlarmRuleNew> list = daoContext.getAlarmRuleNewDaoService().list(alarmRuleNewLambdaQueryWrapper);
标签:LambdaQueryWrapper,list,alarmRuleNewLambdaQueryWrapper,daoContext,字段名,表达式
From: https://www.cnblogs.com/PythonOrg/p/17068934.html