- 名称是selectOne,但有多条数据满足条件的时候,会返回多条数据。
- 解决方法: 加上
.last("limit 1")
String todayStart = DateUtils.getTodayStartTime();
String todayEnd = DateUtils.getTodayEndTime();
QueryWrapper<OrderEntity> wrapper = new QueryWrapper<>();
wrapper.isNull("hold_time")
.ge(true,"create_date",todayStart)
.le(true,"create_date",todayEnd)
.orderByDesc("create_date")
.last("limit 1");
OrderEntity lastOrderInfo = baseDao.selectOne(wrapper);
标签:create,多条,wrapper,baseDao,date,selectOne
From: https://www.cnblogs.com/pansidong/p/17554783.html