【底座】完善SysOrgApi和BizOrgApi

This commit is contained in:
xuyuxiang
2026-03-15 00:11:55 +08:00
parent a4b9ca70c4
commit 4204fa248e
6 changed files with 18 additions and 10 deletions

View File

@@ -38,17 +38,19 @@ public class BizOrgApiProvider implements BizOrgApi {
private BizOrgService bizOrgService;
@Override
public List<JSONObject> orgTreeSelector(String parentId) {
public List<JSONObject> orgTreeSelector(String parentId, String searchKey) {
BizOrgSelectorTreeParam bizOrgSelectorTreeParam = new BizOrgSelectorTreeParam();
bizOrgSelectorTreeParam.setParentId(parentId);
bizOrgSelectorTreeParam.setSearchKey(searchKey);
return bizOrgService.orgTreeSelector(bizOrgSelectorTreeParam);
}
@SuppressWarnings("ALL")
@Override
public Page<JSONObject> orgListSelector(String parentId) {
public Page<JSONObject> orgListSelector(String parentId, String searchKey) {
BizOrgSelectorOrgListParam bizOrgSelectorOrgListParam = new BizOrgSelectorOrgListParam();
bizOrgSelectorOrgListParam.setParentId(parentId);
bizOrgSelectorOrgListParam.setSearchKey(searchKey);
return BeanUtil.toBean(bizOrgService.orgListSelector(bizOrgSelectorOrgListParam), Page.class);
}
}

View File

@@ -197,7 +197,7 @@ public class DevConfigController {
@Operation(summary = "获取组织树选择器(懒加载)")
@GetMapping("/dev/config/orgTreeSelector")
public CommonResult<List<JSONObject>> orgTreeSelector(DevConfigSelectorOrgTreeParam devConfigSelectorOrgTreeParam) {
return CommonResult.data(sysOrgApi.orgTreeSelector(devConfigSelectorOrgTreeParam.getParentId()));
return CommonResult.data(sysOrgApi.orgTreeSelector(devConfigSelectorOrgTreeParam.getParentId(), devConfigSelectorOrgTreeParam.getSearchKey()));
}
/**
@@ -222,7 +222,7 @@ public class DevConfigController {
@Operation(summary = "获取机构选择器")
@GetMapping("/dev/config/orgSelector")
public CommonResult<Page<JSONObject>> orgSelector(DevConfigSelectorOrgListParam devConfigSelectorOrgListParam) {
return CommonResult.data(sysOrgApi.orgListSelector(devConfigSelectorOrgListParam.getParentId()));
return CommonResult.data(sysOrgApi.orgListSelector(devConfigSelectorOrgListParam.getParentId(), devConfigSelectorOrgListParam.getSearchKey()));
}
/**

View File

@@ -29,4 +29,8 @@ public class DevConfigSelectorOrgTreeParam {
/** 父id */
@Schema(description = "父id")
private String parentId;
/** 搜索关键字 */
@Schema(description = "搜索关键字")
private String searchKey;
}

View File

@@ -55,17 +55,19 @@ public class SysOrgApiProvider implements SysOrgApi {
}
@Override
public List<JSONObject> orgTreeSelector(String parentId) {
public List<JSONObject> orgTreeSelector(String parentId, String searchKey) {
SysOrgSelectorTreeParam sysOrgSelectorTreeParam = new SysOrgSelectorTreeParam();
sysOrgSelectorTreeParam.setParentId(parentId);
sysOrgSelectorTreeParam.setSearchKey(searchKey);
return sysOrgService.orgTreeSelector(sysOrgSelectorTreeParam);
}
@SuppressWarnings("ALL")
@Override
public Page<JSONObject> orgListSelector(String parentId) {
public Page<JSONObject> orgListSelector(String parentId, String searchKey) {
SysOrgSelectorOrgListParam sysOrgSelectorOrgListParam = new SysOrgSelectorOrgListParam();
sysOrgSelectorOrgListParam.setParentId(parentId);
sysOrgSelectorOrgListParam.setSearchKey(searchKey);
return BeanUtil.toBean(sysOrgService.orgListSelector(sysOrgSelectorOrgListParam), Page.class);
}