From 62dc1bfe1d8dcba1ce4105d88032cc1bc1bb0ca5 Mon Sep 17 00:00:00 2001 From: mazhicheng Date: Thu, 8 Aug 2019 19:23:59 +0800 Subject: [PATCH] =?UTF-8?q?buildQueryWrapper=E5=A2=9E=E5=8A=A0=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=A0=A1=E9=AA=8C=EF=BC=8C=E9=81=BF=E5=85=8D=E8=AF=AF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/diboot/core/controller/BaseController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/diboot-core/src/main/java/com/diboot/core/controller/BaseController.java b/diboot-core/src/main/java/com/diboot/core/controller/BaseController.java index e65fdde..dcab3f9 100644 --- a/diboot-core/src/main/java/com/diboot/core/controller/BaseController.java +++ b/diboot-core/src/main/java/com/diboot/core/controller/BaseController.java @@ -59,6 +59,9 @@ public class BaseController { * @return */ public QueryWrapper buildQueryWrapper(DTO entityOrDto) throws Exception{ + if(entityOrDto instanceof HttpServletRequest){ + throw new Exception("参数错误:buildQueryWrapper()参数为Entity/DTO对象!"); + } return QueryBuilder.toQueryWrapper(entityOrDto); } @@ -69,6 +72,9 @@ public class BaseController { * @return */ public LambdaQueryWrapper buildLambdaQueryWrapper(DTO entityOrDto) throws Exception{ + if(entityOrDto instanceof HttpServletRequest){ + throw new Exception("参数错误:buildQueryWrapper()参数为Entity/DTO对象!"); + } return QueryBuilder.toLambdaQueryWrapper(entityOrDto); }