From 93093d9f55464f7f69691c359cd27f77f439559d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 5 Nov 2020 13:56:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=20MybatisPlus=20Lambda?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=20=E6=94=B9=E4=B8=BA=E5=AE=98=E6=96=B9?= =?UTF-8?q?=E6=8E=A8=E8=8D=90=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-generator/src/main/resources/vm/java/controller.java.vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-generator/src/main/resources/vm/java/controller.java.vm b/ruoyi-generator/src/main/resources/vm/java/controller.java.vm index f2e7d6af..26b74732 100644 --- a/ruoyi-generator/src/main/resources/vm/java/controller.java.vm +++ b/ruoyi-generator/src/main/resources/vm/java/controller.java.vm @@ -51,7 +51,7 @@ public class ${ClassName}Controller extends BaseController { public TableDataInfo list(${ClassName} ${className}) { startPage(); - LambdaQueryWrapper<${ClassName}> lqw = new LambdaQueryWrapper<${ClassName}>(); + LambdaQueryWrapper<${ClassName}> lqw = Wrappers.lambdaQuery(${className}); #foreach($column in $columns) #set($queryType=$column.queryType) #set($javaField=$column.javaField) @@ -138,7 +138,7 @@ public class ${ClassName}Controller extends BaseController { } #elseif($table.tree) public AjaxResult list(${ClassName} ${className}) { - LambdaQueryWrapper<${ClassName}> lqw = new LambdaQueryWrapper<${ClassName}>(); + LambdaQueryWrapper<${ClassName}> lqw = Wrappers.lambdaQuery(${className}); List<${ClassName}> list = i${ClassName}Service.list(lqw); return AjaxResult.success(list); }