mybatisPlus查询
程序员文章站
2024-03-02 12:52:52
...
mybatisPlus lambda查询数据 查多条
@Override
public List<AlarmEvent> getCurrentList() {
List<AlarmEvent> alarmEventList = baseMapper.selectList(new
QueryWrapper<AlarmEvent>().lambda().eq
(AlarmEvent::getIsAlarm,1).orderByDesc(AlarmEvent::getAlarmTime).last("limit 3"));
return alarmEventList;
}
查单条记录
AlarmEvent alarmEvent = alarmEventMapper.selectOne(wrapper);
上一篇: java程序设计基础第五章总结及习题