我有带有字段的实体项目 - id,...,status
如何使用最后一个 ID 为获取行编写选择?
我试过这个
Item findTopByStatusDesc(int status);
和
Item findOneByStatusDesc(int status);
字节它不起作用。
id name status
1 hz 0
2 hz2 1
3 hz3 1
我只需要获取状态 = 1 和 id 最新的一行3 hz3 1
我需要订购 DESC 并获得第一行,但我不能