|
@@ -23,37 +23,37 @@ import java.util.Set;
|
|
|
* @Version 1.0
|
|
|
*/
|
|
|
@FeignClient(name = ApiConstants.NAME)
|
|
|
-@Tag(name = "RPC 服务 - 部门")
|
|
|
+@Tag(name = "RPC 服务 - 公司")
|
|
|
public interface CompanyApi {
|
|
|
|
|
|
|
|
|
String PREFIX = ApiConstants.PREFIX + "/company";
|
|
|
|
|
|
@GetMapping(PREFIX + "/get")
|
|
|
- @Operation(summary = "获得部门信息")
|
|
|
- @Parameter(name = "id", description = "部门编号", example = "1024", required = true)
|
|
|
+ @Operation(summary = "获得公司信息")
|
|
|
+ @Parameter(name = "id", description = "公司编号", example = "1024", required = true)
|
|
|
CommonResult<CompanyRespDTO> getCompany(@RequestParam("id") String id);
|
|
|
|
|
|
@GetMapping(PREFIX + "/list")
|
|
|
- @Operation(summary = "获得部门信息数组")
|
|
|
- @Parameter(name = "ids", description = "部门编号数组", example = "1,2", required = true)
|
|
|
+ @Operation(summary = "获得公司信息数组")
|
|
|
+ @Parameter(name = "ids", description = "公司编号数组", example = "1,2", required = true)
|
|
|
CommonResult<List<CompanyRespDTO>> getCompanyList(@RequestParam("ids") Collection<String> ids);
|
|
|
|
|
|
@GetMapping(PREFIX + "/list-child")
|
|
|
- @Operation(summary = "获得子部门信息数组")
|
|
|
- @Parameter(name = "id", description = "部门编号", example = "100", required = true)
|
|
|
+ @Operation(summary = "获得子公司信息数组")
|
|
|
+ @Parameter(name = "id", description = "公司编号", example = "100", required = true)
|
|
|
CommonResult<List<CompanyRespDTO>> getChildCompanyList(@RequestParam("id") String id);
|
|
|
|
|
|
@GetMapping(PREFIX + "/valid")
|
|
|
- @Operation(summary = "校验部门是否合法")
|
|
|
- @Parameter(name = "ids", description = "部门编号数组", example = "1,2", required = true)
|
|
|
+ @Operation(summary = "校验公司是否合法")
|
|
|
+ @Parameter(name = "ids", description = "公司编号数组", example = "1,2", required = true)
|
|
|
CommonResult<Boolean> validateCompanyList(@RequestParam("ids") Collection<String> ids);
|
|
|
|
|
|
/**
|
|
|
- * 获得指定编号的部门 Map
|
|
|
+ * 获得指定编号的公司 Map
|
|
|
*
|
|
|
- * @param ids 部门编号数组
|
|
|
- * @return 部门 Map
|
|
|
+ * @param ids 公司编号数组
|
|
|
+ * @return 公司 Map
|
|
|
*/
|
|
|
default Map<String, CompanyRespDTO> getCompanyMap(Set<String> ids) {
|
|
|
return CollectionUtils.convertMap(getCompanyList(ids).getCheckedData(), CompanyRespDTO::getId);
|