Commit beb3e59d authored by 耿迪迪's avatar 耿迪迪

自动生成工具修改 gengdidi

parent 296225c3
...@@ -18,6 +18,7 @@ import com.zehong.common.enums.BusinessType; ...@@ -18,6 +18,7 @@ import com.zehong.common.enums.BusinessType;
import ${packageName}.domain.${ClassName}; import ${packageName}.domain.${ClassName};
import ${packageName}.service.I${ClassName}Service; import ${packageName}.service.I${ClassName}Service;
import com.zehong.common.utils.poi.ExcelUtil; import com.zehong.common.utils.poi.ExcelUtil;
import com.github.pagehelper.PageInfo;
#if($table.crud || $table.sub) #if($table.crud || $table.sub)
import com.zehong.common.core.page.TableDataInfo; import com.zehong.common.core.page.TableDataInfo;
#elseif($table.tree) #elseif($table.tree)
...@@ -36,18 +37,7 @@ public class ${ClassName}Controller extends BaseController ...@@ -36,18 +37,7 @@ public class ${ClassName}Controller extends BaseController
@Autowired @Autowired
private I${ClassName}Service ${className}Service; private I${ClassName}Service ${className}Service;
/** /**
* ${functionName}分页查询
*/
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:pageList')")
@GetMapping("/pageList")
public TableDataInfo pageList(${ClassName} ${className}){
startPage();
PageInfo<${ClassName}> page = ${className}Service.select${ClassName}Page(${className});
return getDataTable(page);
}
/**
* 查询${functionName}列表 * 查询${functionName}列表
*/ */
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')") @PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')")
...@@ -56,7 +46,7 @@ public class ${ClassName}Controller extends BaseController ...@@ -56,7 +46,7 @@ public class ${ClassName}Controller extends BaseController
public TableDataInfo list(${ClassName} ${className}) public TableDataInfo list(${ClassName} ${className})
{ {
startPage(); startPage();
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); PageInfo<${ClassName}> list = ${className}Service.select${ClassName}Page(${className});
return getDataTable(list); return getDataTable(list);
} }
#elseif($table.tree) #elseif($table.tree)
......
...@@ -2,6 +2,7 @@ package ${packageName}.service; ...@@ -2,6 +2,7 @@ package ${packageName}.service;
import java.util.List; import java.util.List;
import ${packageName}.domain.${ClassName}; import ${packageName}.domain.${ClassName};
import com.github.pagehelper.PageInfo;
/** /**
* ${functionName}Service接口 * ${functionName}Service接口
...@@ -33,7 +34,7 @@ public interface I${ClassName}Service ...@@ -33,7 +34,7 @@ public interface I${ClassName}Service
* @param ${className} ${functionName} * @param ${className} ${functionName}
* @return ${functionName}分页集合 * @return ${functionName}分页集合
*/ */
public List<${ClassName}> select${ClassName}Page(${ClassName} ${className}); public PageInfo<${ClassName}> select${ClassName}Page(${ClassName} ${className});
/** /**
* 新增${functionName} * 新增${functionName}
......
...@@ -19,6 +19,7 @@ import ${packageName}.domain.${subClassName}; ...@@ -19,6 +19,7 @@ import ${packageName}.domain.${subClassName};
import ${packageName}.mapper.${ClassName}Mapper; import ${packageName}.mapper.${ClassName}Mapper;
import ${packageName}.domain.${ClassName}; import ${packageName}.domain.${ClassName};
import ${packageName}.service.I${ClassName}Service; import ${packageName}.service.I${ClassName}Service;
import com.github.pagehelper.PageInfo;
/** /**
* ${functionName}Service业务层处理 * ${functionName}Service业务层处理
...@@ -63,9 +64,9 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service ...@@ -63,9 +64,9 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
* @return ${functionName} * @return ${functionName}
*/ */
@Override @Override
public PageInfo<${ClassName}> select${ClassName}List(${ClassName} ${className}) public PageInfo<${ClassName}> select${ClassName}Page(${ClassName} ${className})
{ {
return new PageInfo<>(${className}Mapper.select${ClassName}List(${className})); return new PageInfo(${className}Mapper.select${ClassName}List(${className}));
} }
/** /**
......
import request from '@/utils/request' import request from '@/utils/request'
// 查询${functionName}列表
export function page${BusinessName}(query) {
return request({
url: '/${moduleName}/${businessName}/pageList',
method: 'get',
params: query
})
}
// 查询${functionName}列表 // 查询${functionName}列表
export function list${BusinessName}(query) { export function list${BusinessName}(query) {
return request({ return request({
......
...@@ -458,7 +458,7 @@ export default { ...@@ -458,7 +458,7 @@ export default {
} }
#end #end
#end #end
page${BusinessName}(this.queryParams).then(response => { list${BusinessName}(this.queryParams).then(response => {
this.${businessName}List = response.rows; this.${businessName}List = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment