import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
模糊查询:regex or:orOperator
$gt:大于
$lt:小于
$gte:大于或等于
$lte:小于或等于
Sort:排序
Query query = new Query();
query.addCriteria(Criteria.where("orgId").is(queryShopActionLogReqVO.getOrgId()));
query.addCriteria(Criteria.where("logType").is(queryShopActionLogReqVO.getLogType()));
Criteria criteriaDay = null;
if(!StringUtils.isEmpty(queryShopActionLogReqVO.getStartTime())) {
criteriaDay = Criteria.where("loginTime").gte(queryShopActionLogReqVO.getStartTime());
}
if(!StringUtils.isEmpty(queryShopActionLogReqVO.getEndTime())) {
if(criteriaDay == null){
criteriaDay = Criteria.where("loginTime").lte(query