dev:公共查询类优化
This commit is contained in:
@@ -32,8 +32,8 @@ public class BaseQuery<T> {
|
||||
/**
|
||||
* 创建时间范围查询
|
||||
*/
|
||||
private Date start_time;
|
||||
private Date end_time;
|
||||
private String begin_time;
|
||||
private String end_time;
|
||||
|
||||
|
||||
/**
|
||||
@@ -44,8 +44,8 @@ public class BaseQuery<T> {
|
||||
* 通过buid构建
|
||||
*/
|
||||
public Map<String, QParam> doP = MapOf.of("blurry", QParam.builder().k(new String[]{"name"}).type(QueryTEnum.LK).build()
|
||||
, "startTime", QParam.builder().k(new String[]{"create_time"}).type(QueryTEnum.LT).build()
|
||||
, "endTime", QParam.builder().k(new String[]{"create_time"}).type(QueryTEnum.LE).build()
|
||||
, "begin_time", QParam.builder().k(new String[]{"create_time"}).type(QueryTEnum.GT).build()
|
||||
, "end_time", QParam.builder().k(new String[]{"create_time"}).type(QueryTEnum.LE).build()
|
||||
, "sort", QParam.builder().k(new String[]{"sort"}).type(QueryTEnum.BY).build()
|
||||
);
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@ public enum QueryTEnum {
|
||||
LE((q, k, v) -> {
|
||||
q.le(k[0], v);
|
||||
}),
|
||||
GT((q, k, v) -> {
|
||||
q.gt(k[0], v);
|
||||
}),
|
||||
BY((q, k, v) -> {
|
||||
q.orderByDesc(k[0], v);
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user