我正在春天的休息时间工作。
我有isdeleted =0
表中的一个字段我需要在mysql中找到isdeleted=1
然后它在表格和应用程序列表中显示行中的数据但是如果findall()
,数据保留在数据库的表中,但在应用程序列表中没有显示为软删除,如何使用public interface FoodCourtRepository extends JpaRepository<FoodCourtEntity, Long> {
List<FoodCourtEntity> findAll(isdeleted=false???);
}
方法在存储库文件中实现此条件
d = {'biz': ['baz'], 'bar': ['foo']}
答案 0 :(得分:0)
只需将以下方法添加到您的界面存储库:
List<FoodCourtEntity> findByDeleted(boolean isDeleted);
您可以从中了解更多信息 Spring Data JPA documentation