如果是为了封装 QueryWrapper 查询条件 可以使用: QueryWrapper 和 LambdaQueryWrapper。 切勿使用 QueryChainWrapper 和 LambdaQueryChainWrapper。
因为 待用 chain 的 QueryChainWrapper 和 LambdaQueryChainWrapper 是可以直接 执行 list、get等操作的。
QueryWrapper 和 LambdaQueryWrapper 这俩个才是封装 wrapper条件的工具类。
否则使用chain得就会出现一下异常:
Error evaluating expression 'ew != null and ew.sqlFirst != null'. Cause: org.apache.ibatis.ognl.OgnlException: sqlFirst [com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: can not use this method for "getSqlFirst"]
Error evaluating expression 'ew != null and ew.sqlFirst != null'. Cause: org.apache.ibatis.ognl.OgnlException: sqlFirst [com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: can not use this method for "getSqlFirst"]