Feat:原生内置时间范围搜索
This commit is contained in:
parent
7a2f8ca0ad
commit
1b160cea79
@ -8,6 +8,7 @@ import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 基于名字模糊匹配的查询实体
|
||||
@ -20,13 +21,9 @@ public class NameLikeQo<T extends Domain> extends BaseQo<T> {
|
||||
|
||||
protected String code;
|
||||
|
||||
protected String createTimeStart;
|
||||
protected List<String> createTimeRange;
|
||||
|
||||
protected String createTimeEnd;
|
||||
|
||||
protected String modifyTimeStart;
|
||||
|
||||
protected String modifyTimeEnd;
|
||||
protected List<String> modifyTimeRange;
|
||||
|
||||
protected String creatorId;
|
||||
|
||||
@ -55,10 +52,8 @@ public class NameLikeQo<T extends Domain> extends BaseQo<T> {
|
||||
.with("enable", "code", "creatorId", "modifierId")
|
||||
.with("ids", "id", CriteriaBuilder.Builders.IN)
|
||||
.with("excludeId", "id", Criteria::ne)
|
||||
.with("createTimeStart", "createTime", CriteriaBuilder.Builders.DATE_GTE)
|
||||
.with("createTimeEnd", "createTime", CriteriaBuilder.Builders.DATE_LTE)
|
||||
.with("modifyTimeStart", "modifyTime", CriteriaBuilder.Builders.DATE_GTE)
|
||||
.with("modifyTimeEnd", "modifyTime", CriteriaBuilder.Builders.DATE_LTE);
|
||||
.with("createTimeRange", "createTime", CriteriaBuilder.Builders.DATE_RANGE)
|
||||
.with("modifyTimeRange", "modifyTime", CriteriaBuilder.Builders.DATE_RANGE);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user