Example 用法 Example 用法官方文档 Example example = new Example(TwoElementConfig.class); Example.Criteria criteria = example.createCriteria(); if (StringUtil.isNotBlank(vo.getSource())) { criteria.andEqualTo("source", vo.getSource()); } if (vo.getOpen() != null) { criteria.andEqualTo("open", vo.getOpen()); } if (vo.getStartTime() != null && vo.getEndTime() != null) { criteria.andBetween("createTime", vo.getStartTime(), vo.getEndTime()); } example.setOrderByClause("weight desc"); return iTwoElementConfigMapper.selectByExample(example);