throw new MybatisPlusException("非法SQL,where条件中不能使用数据库函数,错误函数信息:" + function.toString());
public static boolean isCountAll(List<SelectItem> selectItems) { if (selectItems !=null && selectItems.size()==1) { SelectItem firstItem = selectItems.get(0); if ((SelectExpressionItem.class.isInstance(firstItem)) && Function.class.isInstance(((SelectExpressionItem)firstItem).getExpression())) { Function function = (Function) ((SelectExpressionItem) firstItem).getExpression(); if ("count(*)".equals(function.toString())) { return true; } } } return false; }
throw new MybatisPlusException("非法SQL,where条件中不能使用数据库函数,错误函数信息:" + function.toString());