31、升序orderByAsc

  31、升序orderByAsc

         List<Employee> employeeList = employeeMapper.selectList(new QueryWrapper<Employee>().orderByAsc(true,"age"));

         if (!employeeList.isEmpty()) {
logger.info("++条件构造器查询员工信息+++++" + gson.toJson(employeeList));
}

32、降序orderByDesc

  32、降序orderByDesc
List<Employee> employeeList = employeeMapper.selectList(new QueryWrapper<Employee>().orderByDesc(true,"age")); if (!employeeList.isEmpty()) {
logger.info("++条件构造器查询员工信息+++++" + gson.toJson(employeeList));
}

33、回显字段设置

 33、回显字段设置
// SELECT last_Name,email FROM tbl_employee
List<Employee> employeeList = employeeMapper.selectList(new QueryWrapper<Employee>().select("last_Name,email")); if (!employeeList.isEmpty()) {
logger.info("++条件构造器查询员工信息+++++" + gson.toJson(employeeList));
}
05-11 11:35