更改 MybatisPlus Lambda查询 改为官方推荐写法

feature/model
疯狂的狮子li 4 years ago
parent e095a9f73f
commit 93093d9f55

@ -51,7 +51,7 @@ public class ${ClassName}Controller extends BaseController {
public TableDataInfo list(${ClassName} ${className}) public TableDataInfo list(${ClassName} ${className})
{ {
startPage(); startPage();
LambdaQueryWrapper<${ClassName}> lqw = new LambdaQueryWrapper<${ClassName}>(); LambdaQueryWrapper<${ClassName}> lqw = Wrappers.lambdaQuery(${className});
#foreach($column in $columns) #foreach($column in $columns)
#set($queryType=$column.queryType) #set($queryType=$column.queryType)
#set($javaField=$column.javaField) #set($javaField=$column.javaField)
@ -138,7 +138,7 @@ public class ${ClassName}Controller extends BaseController {
} }
#elseif($table.tree) #elseif($table.tree)
public AjaxResult list(${ClassName} ${className}) { 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); List<${ClassName}> list = i${ClassName}Service.list(lqw);
return AjaxResult.success(list); return AjaxResult.success(list);
} }

Loading…
Cancel
Save