修复代码生成器变量名重复问题:issues/IYRZ2
This commit is contained in:
@@ -30,15 +30,15 @@ public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${c
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public PageResult<${className}> findList(Map<String, Object> params){
|
public PageResult<${className}> findList(Map<String, Object> params){
|
||||||
Integer page = MapUtils.getInteger(params, "page");
|
Integer curPage = MapUtils.getInteger(params, "page");
|
||||||
Integer limit = MapUtils.getInteger(params, "limit");
|
Integer limit = MapUtils.getInteger(params, "limit");
|
||||||
if (page == null) {
|
if (curPage == null) {
|
||||||
page = 1;
|
curPage = 1;
|
||||||
}
|
}
|
||||||
if (limit == null) {
|
if (limit == null) {
|
||||||
limit = -1;
|
limit = -1;
|
||||||
}
|
}
|
||||||
Page<${className}> page = new Page<>(page, limit);
|
Page<${className}> page = new Page<>(curPage, limit);
|
||||||
List<${className}> list = baseMapper.findList(page, params);
|
List<${className}> list = baseMapper.findList(page, params);
|
||||||
return PageResult.<${className}>builder().data(list).code(0).count(page.getTotal()).build();
|
return PageResult.<${className}>builder().data(list).code(0).count(page.getTotal()).build();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user