Home > Back-end >  Default add JPA query conditions have support?
Default add JPA query conditions have support?

Time:10-07

To post a tuo code
 
Page Page=chartService. The.findall (specification, PageRequest) of (the req. GetPageNo (), the req. GetPageSize ()));
Page. GetContent (). The forEach (e - & gt; {
Um participant etDatasourceSet ();
});

When getDatasourceSet, how can the default add some conditions? For example, is_delete=0

CodePudding user response:

Inheritance, overloading getDatasourceSet, adding their own logic, such as
 if (is_delete==0) 
Super. GetDatasourceSet ();

Or spring aop, processing in before or around,
  • Related