add(gen): 生成下拉框查询接口

- 在 api.ts.vm 文件中添加 get${BusinessName}List 函数,用于查询下拉框列表
- 在 controller.java.vm 文件中添加 get${ClassName}List 方法,处理下拉框查询请求
- 新增接口支持通过 GET 请求获取 ${functionName} 列表,用于填充下拉框
master
zch 2 weeks ago
parent b4f0587c01
commit 03f2457be7

@ -113,4 +113,15 @@ public class ${ClassName}Controller extends BaseController {
@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) {
return toAjax(${className}Service.deleteWithValidByIds(List.of(${pkColumn.javaField}s), true));
}
/**
* 下拉框查询${functionName}列表
*/
#* @SaCheckPermission("${permissionPrefix}:list")*#
@GetMapping("get${ClassName}List")
public R<List<${ClassName}Vo>> get${ClassName}list(${ClassName}Bo bo) {
List<${ClassName}Vo> list = ${className}Service.queryList(bo);
return R.ok(list);
}
}

@ -61,3 +61,17 @@ export const del${BusinessName} = (${pkColumn.javaField}: string | number | Arra
method: 'delete'
});
};
/**
* 下拉框查询${functionName}列表
* @param query
* @returns {*}
*/
export function get${BusinessName}List (query) {
return request({
url: '/${moduleName}/${businessName}/get${BusinessName}List',
method: 'get',
params: query
});
};

Loading…
Cancel
Save