Repository: takeoff-26/logistics-service
Pull request #111: feature/#101: hubId기준으로 업체 배송담당자, 허브 배송담당자 전체 리스트 조회 앤드포인트 API 구현, co…
Author: login: 2sminn
Labels: name: ✨ feat
description: 기능 구현
name: ♻️ refactor
description: 코드 리팩토링
Created: 2025-03-22T07:42:17Z | Merged: 2025-03-23T11:34:10Z

…mpanyId, hubId기준으로 업체 관리자, 허브 관리자 전체 리스트 조회 앤드포인트 API 구현

## #️⃣연관된 이슈
- resolve: #101 

## 변경 타입
- [x] 신규 기능 추가/수정
- [x] 버그 수정
- [x] 리팩토링

## 변경 내용
- **as-is**
  - 배송, 상품 MS에서 FeignClient 내부 호출에 응답하는 앤드포인트 API 구현 필요

- **to-be**(변경 후 설명을 여기에 작성)

  - [x] hubId기준으로 업체 배송담당자 전체 리스트 조회 앤드포인트 API 구현
  - [x] hubId기준으로 허브 배송담당자 전체 리스트 조회 앤드포인트 API 구현
  - [x] companyId, hubId 기준으로 업체 담당자, 허브 담당자 전체 리스트 조회 앤드포인트 API 구현

## 체크리스트
- [x] 코드가 제대로 동작하는지 확인했습니다.

## 코멘트
- (추가적인 설명이나 코멘트가 필요한 경우 여기에 작성)



Diff:
diff --git a/gateway/src/main/java/takeoff/logistics_service/msa/gateway/security/GatewayJwtFilter.java b/gateway/src/main/java/takeoff/logistics_service/msa/gateway/security/GatewayJwtFilter.java
index b4d241b3..e3ed1cdf 100644
--- a/gateway/src/main/java/takeoff/logistics_service/msa/gateway/security/GatewayJwtFilter.java
+++ b/gateway/src/main/java/takeoff/logistics_service/msa/gateway/security/GatewayJwtFilter.java
@@ -6,6 +6,7 @@
 import org.springframework.cloud.gateway.filter.GatewayFilterChain;
 import org.springframework.cloud.gateway.filter.GlobalFilter;
 import org.springframework.core.Ordered;
+import org.springframework.http.HttpStatus;
 import org.springframework.http.server.reactive.ServerHttpRequest;
 import org.springframework.stereotype.Component;
 import org.springframework.web.server.ServerWebExchange;
@@ -37,6 +38,7 @@ public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
 
         if (token == null || !token.startsWith("Bearer ")) {
             log.warn("JWT 토큰 누락 또는 형식 오류 → 401 Unauthorized");
+            exchange.getResponse().setStatusCode(HttpStatus.UNAUTHORIZED);
             return exchange.getResponse().setComplete();
         }
 
diff --git a/gateway/src/main/java/takeoff/logistics_service/msa/gateway/security/GatewaySecurityConfig.java b/gateway/src/main/java/takeoff/logistics_service/msa/gateway/security/GatewaySecurityConfig.java
index fc801dfd..2d3b835a 100644
--- a/gateway/src/main/java/takeoff/logistics_service/msa/gateway/security/GatewaySecurityConfig.java
+++ b/gateway/src/main/java/takeoff/logistics_service/msa/gateway/security/GatewaySecurityConfig.java
@@ -20,7 +20,7 @@ public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
                 .csrf(ServerHttpSecurity.CsrfSpec::disable)
                 .cors(cors -> cors.configurationSource(corsConfigurationSource()))
                 .authorizeExchange(exchange -> exchange
-                        .pathMatchers("api/v1/auth/login", "/auth/token/refresh", "/api/v1/users/signup", "/api/v1/app/**").permitAll()
+                        .pathMatchers("/auth/login", "/auth/token/refresh", "/api/v1/users/signup", "/api/v1/app/**", "/docs","/springdoc/**").permitAll()
                         .anyExchange().authenticated()
                 )
                 .build();
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/application/client/CompanyClient.java b/user/src/main/java/takeoff/logistics_service/msa/user/application/client/CompanyClient.java
new file mode 100644
index 00000000..8f2f4c94
--- /dev/null
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/application/client/CompanyClient.java
@@ -0,0 +1,14 @@
+package takeoff.logistics_service.msa.user.application.client;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import takeoff.logistics_service.msa.user.application.dto.GetCompanyFeignResponse;
+
+import java.util.UUID;
+
+@FeignClient(name = "company", path = "/api/v1/app/companies")
+public interface CompanyClient {
+    @GetMapping("/{companyId}")
+    GetCompanyFeignResponse findCompanyById(@PathVariable("companyId") UUID companyId);
+}
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/application/client/HubClient.java b/user/src/main/java/takeoff/logistics_service/msa/user/application/client/HubClient.java
new file mode 100644
index 00000000..39b487af
--- /dev/null
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/application/client/HubClient.java
@@ -0,0 +1,14 @@
+package takeoff.logistics_service.msa.user.application.client;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import takeoff.logistics_service.msa.user.application.dto.GetHubFeignResponse;
+
+import java.util.UUID;
+
+@FeignClient(name = "hub", path = "/api/v1/app/hubs")
+public interface HubClient {
+    @GetMapping("/{hubId}")
+    GetHubFeignResponse findHubById(@PathVariable("hubId") UUID hubId);
+}
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/application/dto/GetCompanyFeignResponse.java b/user/src/main/java/takeoff/logistics_service/msa/user/application/dto/GetCompanyFeignResponse.java
new file mode 100644
index 00000000..e276802e
--- /dev/null
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/application/dto/GetCompanyFeignResponse.java
@@ -0,0 +1,14 @@
+package takeoff.logistics_service.msa.user.application.dto;
+
+import java.time.LocalDateTime;
+import java.util.UUID;
+
+public record GetCompanyFeignResponse(
+        UUID companyId,
+        String companyName,
+        String companyType,
+        UUID hubId,
+        String address,
+        LocalDateTime createdAt,
+        LocalDateTime updatedAt
+) {}
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/application/dto/GetHubFeignResponse.java b/user/src/main/java/takeoff/logistics_service/msa/user/application/dto/GetHubFeignResponse.java
new file mode 100644
index 00000000..19c7d21d
--- /dev/null
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/application/dto/GetHubFeignResponse.java
@@ -0,0 +1,11 @@
+package takeoff.logistics_service.msa.user.application.dto;
+
+import java.util.UUID;
+
+public record GetHubFeignResponse(
+        UUID hubId,
+        String hubName,
+        String address,
+        Double latitude,
+        Double longitude
+) {}
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/application/service/DeliveryManagerService.java b/user/src/main/java/takeoff/logistics_service/msa/user/application/service/DeliveryManagerService.java
index c0f76a50..3f699116 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/application/service/DeliveryManagerService.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/application/service/DeliveryManagerService.java
@@ -5,11 +5,16 @@
 import takeoff.logistics_service.msa.user.presentation.dto.request.PostDeliveryManagerRequestDto;
 import takeoff.logistics_service.msa.user.presentation.dto.response.*;
 
+import java.util.List;
+import java.util.UUID;
+
 public interface DeliveryManagerService {
     PostDeliveryManagerResponseDto createDeliveryManager(PostDeliveryManagerRequestDto requestDto);
     PatchDeliveryManagerResponseDto updateDeliveryManager(Long id, PatchDeliveryManagerRequestDto requestDto);
     GetDeliveryManagerResponseDto getDeliveryManagerById(Long id);
     GetDeliveryManagerListResponseDto getAllDeliveryManagers(GetDeliveryManagerListRequestDto requestDto);
     DeleteDeliveryManagerResponseDto deleteDeliveryManager(Long id);
+    List<GetDeliveryManagerListInfoDto> getCompanyDeliveryManagersByHubId(UUID hubId);
+    List<GetDeliveryManagerListInfoDto> getAllHubDeliveryManagers();
 
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/application/service/DeliveryManagerServiceImpl.java b/user/src/main/java/takeoff/logistics_service/msa/user/application/service/DeliveryManagerServiceImpl.java
index 359bd57d..6925a366 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/application/service/DeliveryManagerServiceImpl.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/application/service/DeliveryManagerServiceImpl.java
@@ -9,7 +9,9 @@
 import takeoff.logistics_service.msa.user.domain.repository.UserRepository;
 import takeoff.logistics_service.msa.user.domain.service.DeliveryManagerSearchCondition;
 import takeoff.logistics_service.msa.user.domain.service.SearchQueryService;
+import takeoff.logistics_service.msa.user.domain.vo.DeliveryManagerType;
 import takeoff.logistics_service.msa.user.domain.vo.DeliverySequence;
+import takeoff.logistics_service.msa.user.domain.vo.HubId;
 import takeoff.logistics_service.msa.user.presentation.common.dto.PaginationDto;
 import takeoff.logistics_service.msa.user.presentation.dto.request.GetDeliveryManagerListRequestDto;
 import takeoff.logistics_service.msa.user.presentation.dto.request.PatchDeliveryManagerRequestDto;
@@ -17,6 +19,7 @@
 import takeoff.logistics_service.msa.user.presentation.dto.response.*;
 
 import java.util.List;
+import java.util.UUID;
 
 @Service
 @RequiredArgsConstructor
@@ -29,10 +32,29 @@ public class DeliveryManagerServiceImpl implements DeliveryManagerService {
     @Override
     @Transactional
     public PostDeliveryManagerResponseDto createDeliveryManager(PostDeliveryManagerRequestDto requestDto) {
-        if(userRepository.findByUsername(requestDto.username()).isEmpty()){
-            throw new IllegalArgumentException("해당 사용자 이름이 존재하지 않습니다: " + requestDto.username());
+        boolean isDuplicate = userRepository.findByUsername(requestDto.username())
+                .filter(user -> user.getRole().equals(requestDto.role()))
+                .isPresent();
+
+        if (isDuplicate) {
+            throw new IllegalArgumentException("해당 사용자 이름과 역할이 이미 존재합니다: " + requestDto.username());
+        }
+        int nextSequence = 0;
+        HubId hubId = HubId.from(UUID.fromString(requestDto.identifier()));
+
+        if (requestDto.deliveryManagerType() == DeliveryManagerType.COMPANY_DELIVERY_MANAGER) {
+            nextSequence = userRepository.countCompanyDeliveryManagersByHubId(hubId);
+        } else if (requestDto.deliveryManagerType() == DeliveryManagerType.HUB_DELIVERY_MANAGER) {
+            nextSequence = userRepository.countHubDeliveryManagersByHubId(hubId);
+        } else {
+            throw new IllegalArgumentException("지원하지 않는 배송 관리자 타입입니다.");
+        }
+        if (nextSequence >= 10) {
+            throw new IllegalStateException("해당 허브에는 최대 10명의 배송 담당자만 등록할 수 있습니다.");
         }
-        DeliveryManager deliveryManager = requestDto.toEntity();
+
+        DeliverySequence sequence = DeliverySequence.from(nextSequence);
+        DeliveryManager deliveryManager = requestDto.toEntityWithSequence(sequence);
         userRepository.save(deliveryManager);
         return PostDeliveryManagerResponseDto.from(deliveryManager);
     }
@@ -89,4 +111,18 @@ public DeleteDeliveryManagerResponseDto deleteDeliveryManager(Long id) {
         manager.deleteDeliveryManager();
         return DeleteDeliveryManagerResponseDto.from(manager.getId());
     }
+
+    @Override
+    public List<GetDeliveryManagerListInfoDto> getCompanyDeliveryManagersByHubId(UUID hubId) {
+        return userRepository.findAllCompanyDeliveryManagersByHubId(HubId.from(hubId)).stream()
+                .map(GetDeliveryManagerListInfoDto::from)
+                .toList();
+    }
+
+    @Override
+    public List<GetDeliveryManagerListInfoDto> getAllHubDeliveryManagers() {
+        return userRepository.findAllHubDeliveryManagers().stream()
+                .map(GetDeliveryManagerListInfoDto::from)
+                .toList();
+    }
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/application/service/UserService.java b/user/src/main/java/takeoff/logistics_service/msa/user/application/service/UserService.java
index 2c0d4fc6..f2c400d5 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/application/service/UserService.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/application/service/UserService.java
@@ -3,6 +3,8 @@
 import takeoff.logistics_service.msa.user.presentation.dto.request.*;
 import takeoff.logistics_service.msa.user.presentation.dto.response.*;
 
+import java.util.List;
+
 public interface UserService {
     PostSignupResponseDto signup(PostSignupRequestDto requestDto);
     GetUserResponseDto getUserById(Long id);
@@ -10,4 +12,6 @@ public interface UserService {
     DeleteUserResponseDto deleteUser(Long id);
     GetUserListResponseDto getAllUsers(GetUserListRequestDto requestDto);
     UserValidationResponseDto validateUser(UserValidationRequestDto requestDto);
+    List<GetManagerListInfoDto> getUsersByCompanyManagerId(Long managerId);
+    List<GetManagerListInfoDto> getUsersByHubManagerId(Long managerId);
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/application/service/UserServiceImpl.java b/user/src/main/java/takeoff/logistics_service/msa/user/application/service/UserServiceImpl.java
index 732e820a..0c942ce5 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/application/service/UserServiceImpl.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/application/service/UserServiceImpl.java
@@ -7,16 +7,21 @@
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import takeoff.logistics_service.msa.user.domain.entity.CompanyManager;
+import takeoff.logistics_service.msa.user.domain.entity.HubManager;
 import takeoff.logistics_service.msa.user.domain.entity.User;
 import takeoff.logistics_service.msa.user.domain.entity.UserRole;
 import takeoff.logistics_service.msa.user.domain.repository.UserRepository;
 import takeoff.logistics_service.msa.user.domain.service.SearchQueryService;
 import takeoff.logistics_service.msa.user.domain.service.UserSearchCondition;
+import takeoff.logistics_service.msa.user.domain.vo.CompanyId;
+import takeoff.logistics_service.msa.user.domain.vo.HubId;
 import takeoff.logistics_service.msa.user.presentation.common.dto.PaginationDto;
 import takeoff.logistics_service.msa.user.presentation.dto.request.*;
 import takeoff.logistics_service.msa.user.presentation.dto.response.*;
 
 import java.util.List;
+import java.util.UUID;
 
 @Service
 @RequiredArgsConstructor
@@ -110,5 +115,21 @@ public UserValidationResponseDto validateUser(UserValidationRequestDto requestDt
         return UserValidationResponseDto.from(user);
     }
 
+    @Override
+    public List<GetManagerListInfoDto> getUsersByCompanyManagerId(Long managerId) {
+        CompanyManager manager = userRepository.findCompanyManagerById(managerId)
+                .orElseThrow(() -> new IllegalArgumentException("회사 매니저를 찾을 수 없습니다."));
+        return userRepository.findAllEmployeesByCompanyId(manager.getCompanyId()).stream()
+                .map(GetManagerListInfoDto::from)
+                .toList();
+    }
 
+    @Override
+    public List<GetManagerListInfoDto> getUsersByHubManagerId(Long managerId) {
+        HubManager manager = userRepository.findHubManagerById(managerId)
+                .orElseThrow(() -> new IllegalArgumentException("허브 매니저를 찾을 수 없습니다."));
+        return userRepository.findAllEmployeesByHubId(manager.getHubId()).stream()
+                .map(GetManagerListInfoDto::from)
+                .toList();
+    }
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/CompanyDeliveryManager.java b/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/CompanyDeliveryManager.java
index 52042ddb..54a191cf 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/CompanyDeliveryManager.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/CompanyDeliveryManager.java
@@ -29,7 +29,6 @@ public String getIdentifier() {
     public void updateIdentifier(String identifier) {
         this.hubId = HubId.from(UUID.fromString(identifier));
     }
-
     public static CompanyDeliveryManager create(String username, String slackEmail, String password, UserRole role, HubId hubId, DeliverySequence deliverySequence) {
         return new CompanyDeliveryManager(username, slackEmail, password, role, hubId, deliverySequence);
     }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/CompanyManager.java b/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/CompanyManager.java
new file mode 100644
index 00000000..183bd077
--- /dev/null
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/CompanyManager.java
@@ -0,0 +1,57 @@
+package takeoff.logistics_service.msa.user.domain.entity;
+
+import jakarta.persistence.*;
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import takeoff.logistics_service.msa.user.application.dto.GetCompanyFeignResponse;
+import takeoff.logistics_service.msa.user.domain.vo.CompanyId;
+import takeoff.logistics_service.msa.user.domain.vo.HubId;
+
+import java.util.UUID;
+
+
+@Entity
+@Getter
+@DiscriminatorValue("COMPANY_MANAGER")
+@NoArgsConstructor(access = AccessLevel.PROTECTED)
+@Table(name = "p_company_manager")
+@AttributeOverride(name = "companyId.companyIdentifier", column = @Column(name = "company_id"))
+@AttributeOverride(name = "hubId.hubIdentifier", column = @Column(name = "hub_id"))
+public class CompanyManager extends Employee {
+
+    @Embedded
+    private CompanyId companyId;
+    @Embedded
+    private HubId hubId;
+
+    protected CompanyManager(String username, String slackEmail, String password, UserRole role, CompanyId companyId, HubId hubId) {
+        super(username, slackEmail, password, role);
+        this.companyId = companyId;
+        this.hubId = hubId;
+    }
+
+    public static CompanyManager createFromFeign(String username, String slackEmail, String password, UserRole role, GetCompanyFeignResponse companyResponse) {
+        return new CompanyManager(
+                username,
+                slackEmail,
+                password,
+                role,
+                CompanyId.from(companyResponse.companyId()),
+                HubId.from(companyResponse.hubId())
+        );
+    }
+
+    public void updateCompanyId(UUID newCompanyId) {
+        this.companyId = CompanyId.from(newCompanyId);
+    }
+
+    public void updateHubId(UUID newHubId) {
+        this.hubId = HubId.from(newHubId);
+    }
+
+    @Override
+    public String getIdentifier() {
+        return companyId.getCompanyIdentifier().toString();
+    }
+}
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/Employee.java b/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/Employee.java
new file mode 100644
index 00000000..b0ed6e7c
--- /dev/null
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/Employee.java
@@ -0,0 +1,29 @@
+package takeoff.logistics_service.msa.user.domain.entity;
+
+import jakarta.persistence.DiscriminatorValue;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Table;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import takeoff.logistics_service.msa.user.domain.vo.CompanyId;
+import takeoff.logistics_service.msa.user.domain.vo.HubId;
+
+@NoArgsConstructor(access = AccessLevel.PROTECTED)
+@Entity
+@DiscriminatorValue("EMPLOYEE")
+@Table(name = "p_employee")
+public abstract class Employee extends User {
+
+    protected Employee(String username, String slackEmail, String password, UserRole role) {
+        super(username, slackEmail, password, role);
+    }
+
+    public CompanyId getCompanyId() {
+        return null;
+    }
+    public HubId getHubId() {
+        return null;
+    }
+
+    public abstract String getIdentifier();
+}
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/HubDeliveryManager.java b/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/HubDeliveryManager.java
index 41a6b845..f5d670f3 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/HubDeliveryManager.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/HubDeliveryManager.java
@@ -1,12 +1,16 @@
 package takeoff.logistics_service.msa.user.domain.entity;
 
 import jakarta.persistence.DiscriminatorValue;
+import jakarta.persistence.Embedded;
 import jakarta.persistence.Entity;
 import jakarta.persistence.Table;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import takeoff.logistics_service.msa.user.domain.vo.DeliveryManagerType;
 import takeoff.logistics_service.msa.user.domain.vo.DeliverySequence;
+import takeoff.logistics_service.msa.user.domain.vo.HubId;
+
+import java.util.UUID;
 
 @Entity
 @DiscriminatorValue("HUB_DELIVERY_MANAGER")
@@ -22,7 +26,7 @@ public String getIdentifier() {
         return null;
     }
     public void updateIdentifier(String identifier) {
-        throw new UnsupportedOperationException("HubDeliveryManager는 Identifier를 변경할 수 없습니다.");
+        throw new UnsupportedOperationException("허브 배송 담당자는 식별자를 변경할 수 없습니다.");
     }
     public static HubDeliveryManager create(String username, String slackEmail, String password, UserRole role, DeliverySequence deliverySequence) {
         return new HubDeliveryManager(username, slackEmail, password, role, deliverySequence);
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/HubManager.java b/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/HubManager.java
new file mode 100644
index 00000000..c5bb9110
--- /dev/null
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/domain/entity/HubManager.java
@@ -0,0 +1,47 @@
+package takeoff.logistics_service.msa.user.domain.entity;
+
+import jakarta.persistence.*;
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import takeoff.logistics_service.msa.user.application.dto.GetHubFeignResponse;
+import takeoff.logistics_service.msa.user.domain.vo.HubId;
+
+import java.util.UUID;
+
+
+@Entity
+@Getter
+@DiscriminatorValue("HUB_MANAGER")
+@NoArgsConstructor(access = AccessLevel.PROTECTED)
+@Table(name = "p_hub_manager")
+@AttributeOverride(name = "hubId.hubIdentifier", column = @Column(name = "hub_id"))
+public class HubManager extends Employee {
+
+    @Embedded
+    private HubId hubId;
+
+    protected HubManager(String username, String slackEmail, String password, UserRole role, HubId hubId) {
+        super(username, slackEmail, password, role);
+        this.hubId = hubId;
+    }
+
+    public static HubManager createFromFeign(String username, String slackEmail, String password, UserRole role, GetHubFeignResponse hubResponse) {
+        return new HubManager(
+                username,
+                slackEmail,
+                password,
+                role,
+                HubId.from(hubResponse.hubId())
+        );
+    }
+
+    public void updateHubId(UUID newHubId) {
+        this.hubId = HubId.from(newHubId);
+    }
+
+    @Override
+    public String getIdentifier() {
+        return hubId.getHubIdentifier().toString();
+    }
+}
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/domain/repository/UserRepository.java b/user/src/main/java/takeoff/logistics_service/msa/user/domain/repository/UserRepository.java
index a1ebda74..c6e21099 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/domain/repository/UserRepository.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/domain/repository/UserRepository.java
@@ -3,10 +3,13 @@
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.domain.Specification;
-import takeoff.logistics_service.msa.user.domain.entity.DeliveryManager;
-import takeoff.logistics_service.msa.user.domain.entity.User;
+import takeoff.logistics_service.msa.user.domain.entity.*;
+import takeoff.logistics_service.msa.user.domain.vo.CompanyId;
+import takeoff.logistics_service.msa.user.domain.vo.HubId;
 
+import java.util.List;
 import java.util.Optional;
+import java.util.UUID;
 
 public interface UserRepository {
     User save(User user);
@@ -16,6 +19,12 @@ public interface UserRepository {
     Page<User> findAll(Specification<User> spec, Pageable pageable);
     Page<DeliveryManager> findAllDeliveryManagers(Specification<DeliveryManager> spec, Pageable pageable);
     Optional<DeliveryManager> findDeliveryManagerById(Long id);
-    Optional<User> findByUsernameAndPassword(String username, String password);
-
+    List<CompanyDeliveryManager> findAllCompanyDeliveryManagersByHubId(HubId hubId);
+    List<HubDeliveryManager> findAllHubDeliveryManagers();
+    List<Employee> findAllEmployeesByCompanyId(CompanyId companyId);
+    List<Employee> findAllEmployeesByHubId(HubId hubId);
+    Optional<CompanyManager> findCompanyManagerById(Long id);
+    Optional<HubManager> findHubManagerById(Long id);
+    int countCompanyDeliveryManagersByHubId(HubId hubId);
+    int countHubDeliveryManagersByHubId(HubId hubId);
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/domain/vo/DeliverySequence.java b/user/src/main/java/takeoff/logistics_service/msa/user/domain/vo/DeliverySequence.java
index 7542e46f..3493f748 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/domain/vo/DeliverySequence.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/domain/vo/DeliverySequence.java
@@ -14,13 +14,13 @@
 public class DeliverySequence {
 
     @Column(name = "delivery_sequence", nullable = false)
-    private int value;
+    private int sequenceNumber;
 
-    private DeliverySequence(int value) {
-        this.value = value;
+    private DeliverySequence(int sequenceNumber) {
+        this.sequenceNumber = sequenceNumber;
     }
 
-    public static DeliverySequence from(int value) {
-        return new DeliverySequence(value);
+    public static DeliverySequence from(int sequenceNumber) {
+        return new DeliverySequence(sequenceNumber);
     }
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/infrastructure/persistence/JpaUserRepository.java b/user/src/main/java/takeoff/logistics_service/msa/user/infrastructure/persistence/JpaUserRepository.java
index 94278796..ed245ea8 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/infrastructure/persistence/JpaUserRepository.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/infrastructure/persistence/JpaUserRepository.java
@@ -6,11 +6,15 @@
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Query;
-import takeoff.logistics_service.msa.user.domain.entity.DeliveryManager;
-import takeoff.logistics_service.msa.user.domain.entity.User;
+import org.springframework.data.repository.query.Param;
+import takeoff.logistics_service.msa.user.domain.entity.*;
 import takeoff.logistics_service.msa.user.domain.repository.UserRepository;
+import takeoff.logistics_service.msa.user.domain.vo.CompanyId;
+import takeoff.logistics_service.msa.user.domain.vo.HubId;
 
+import java.util.List;
 import java.util.Optional;
+import java.util.UUID;
 
 public interface JpaUserRepository extends JpaRepository<User, Long>, UserRepository, JpaSpecificationExecutor<User> {
     @Override
@@ -35,7 +39,36 @@ default Page<DeliveryManager> findAllDeliveryManagers(Specification<DeliveryMana
     }
 
     @Override
-    @Query("SELECT u FROM User u WHERE u.username = :username AND u.password = :password AND u.deletedAt IS NULL")
-    Optional<User> findByUsernameAndPassword(String username, String password);
+    @Query("SELECT m FROM CompanyDeliveryManager m WHERE m.hubId = :hubId AND m.deletedAt IS NULL")
+    List<CompanyDeliveryManager> findAllCompanyDeliveryManagersByHubId(HubId hubId);
+
+    @Override
+    @Query("SELECT m FROM HubDeliveryManager m WHERE m.hubId IS NULL AND m.deletedAt IS NULL")
+    List<HubDeliveryManager> findAllHubDeliveryManagers();
+
+    @Override
+    @Query("SELECT e FROM Employee e WHERE e.companyId = :companyId AND e.deletedAt IS NULL")
+    List<Employee> findAllEmployeesByCompanyId(@Param("companyId") CompanyId companyId);
+
+    @Override
+    @Query("SELECT e FROM Employee e WHERE e.hubId = :hubId AND e.deletedAt IS NULL")
+    List<Employee> findAllEmployeesByHubId(@Param("hubId") HubId hubId);
+
+    @Override
+    @Query("SELECT m FROM CompanyManager m WHERE m.id = :id AND m.deletedAt IS NULL")
+    Optional<CompanyManager> findCompanyManagerById(Long id);
+
+    @Override
+    @Query("SELECT m FROM HubManager m WHERE m.id = :id AND m.deletedAt IS NULL")
+    Optional<HubManager> findHubManagerById(Long id);
+
+    @Override
+    @Query("SELECT COUNT(m) FROM CompanyDeliveryManager m WHERE m.hubId = :hubId AND m.deletedAt IS NULL")
+    int countCompanyDeliveryManagersByHubId(HubId hubId);
+
+    @Override
+    @Query("SELECT COUNT(m) FROM HubDeliveryManager m WHERE m.hubId = :hubId AND m.deletedAt IS NULL")
+    int countHubDeliveryManagersByHubId(HubId hubId);
+
 
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/request/PostDeliveryManagerRequestDto.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/request/PostDeliveryManagerRequestDto.java
index d0bdb659..1c65600e 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/request/PostDeliveryManagerRequestDto.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/request/PostDeliveryManagerRequestDto.java
@@ -44,4 +44,15 @@ public DeliveryManager toEntity() {
                 deliveryManagerType
         );
     }
+    public DeliveryManager toEntityWithSequence(DeliverySequence sequence) {
+        return DeliveryManager.create(
+                username,
+                slackEmail,
+                password,
+                role,
+                identifier,
+                sequence,
+                deliveryManagerType
+        );
+    }
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/request/PostSignupRequestDto.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/request/PostSignupRequestDto.java
index 881aae12..1dd2b88a 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/request/PostSignupRequestDto.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/request/PostSignupRequestDto.java
@@ -5,6 +5,10 @@
 import jakarta.validation.constraints.Pattern;
 import jakarta.validation.constraints.Size;
 import lombok.Builder;
+import takeoff.logistics_service.msa.user.application.dto.GetCompanyFeignResponse;
+import takeoff.logistics_service.msa.user.application.dto.GetHubFeignResponse;
+import takeoff.logistics_service.msa.user.domain.entity.CompanyManager;
+import takeoff.logistics_service.msa.user.domain.entity.HubManager;
 import takeoff.logistics_service.msa.user.domain.entity.User;
 import takeoff.logistics_service.msa.user.domain.entity.UserRole;
 import takeoff.logistics_service.msa.user.domain.vo.SlackId;
@@ -27,15 +31,20 @@ public record PostSignupRequestDto(
         @Pattern(regexp = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]+$",
                 message = "비밀번호는 대소문자, 숫자, 특수문자를 포함해야 합니다.")
         String password,
-        UserRole role
+        UserRole role,
+        GetCompanyFeignResponse companyFeignResponse,
+        GetHubFeignResponse hubFeignResponse
 ) {
     public User toEntity(String encodedPassword){
-        return User.builder()
-                .username(username)
-                .slackEmail(slackEmail)
-                .password(encodedPassword)
-                .role(role)
-                .build();
+        return switch (role) {
+            case COMPANY_MANAGER -> CompanyManager.createFromFeign(
+                    username, slackEmail, encodedPassword, role, companyFeignResponse
+            );
+            case HUB_MANAGER -> HubManager.createFromFeign(
+                    username, slackEmail, encodedPassword, role, hubFeignResponse
+            );
+            default -> User.create(username, slackEmail, encodedPassword, role);
+        };
     }
 
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetDeliveryManagerListInfoDto.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetDeliveryManagerListInfoDto.java
index 6a3382bf..297c9b1d 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetDeliveryManagerListInfoDto.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetDeliveryManagerListInfoDto.java
@@ -4,13 +4,22 @@
 import takeoff.logistics_service.msa.user.domain.entity.DeliveryManager;
 
 @Builder
-public record GetDeliveryManagerListInfoDto(Long deliveryManagerId, String username, String slackEmail, String deliveryManagerType) {
+public record GetDeliveryManagerListInfoDto(
+        Long deliveryManagerId,
+        String username,
+        String slackEmail,
+        String deliveryManagerType,
+        String identifier,
+        int sequenceNumber
+) {
     public static GetDeliveryManagerListInfoDto from(DeliveryManager manager) {
         return GetDeliveryManagerListInfoDto.builder()
                 .deliveryManagerId(manager.getId())
                 .username(manager.getUsername())
                 .slackEmail(manager.getSlackEmail())
                 .deliveryManagerType(manager.getDeliveryManagerType().name())
+                .identifier(manager.getIdentifier())
+                .sequenceNumber(manager.getDeliverySequence().getSequenceNumber())
                 .build();
     }
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetDeliveryManagerListInternalResponseDto.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetDeliveryManagerListInternalResponseDto.java
new file mode 100644
index 00000000..05501e41
--- /dev/null
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetDeliveryManagerListInternalResponseDto.java
@@ -0,0 +1,13 @@
+package takeoff.logistics_service.msa.user.presentation.dto.response;
+
+import lombok.Builder;
+import java.util.List;
+
+@Builder
+public record GetDeliveryManagerListInternalResponseDto(
+        List<GetDeliveryManagerListInfoDto> deliveryManagers
+) {
+    public static GetDeliveryManagerListInternalResponseDto from(List<GetDeliveryManagerListInfoDto> list) {
+        return new GetDeliveryManagerListInternalResponseDto(list);
+    }
+}
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetDeliveryManagerResponseDto.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetDeliveryManagerResponseDto.java
index 014ca0bf..927d6b7c 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetDeliveryManagerResponseDto.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetDeliveryManagerResponseDto.java
@@ -20,7 +20,7 @@ public static GetDeliveryManagerResponseDto from(DeliveryManager manager) {
                 .slackEmail(manager.getSlackEmail())
                 .deliveryManagerType(manager.getDeliveryManagerType())
                 .identifier(manager.getIdentifier())
-                .deliverySequence(manager.getDeliverySequence().getValue())
+                .deliverySequence(manager.getDeliverySequence().getSequenceNumber())
                 .build();
     }
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetManagerListInfoDto.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetManagerListInfoDto.java
new file mode 100644
index 00000000..ffb5cdb8
--- /dev/null
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetManagerListInfoDto.java
@@ -0,0 +1,31 @@
+package takeoff.logistics_service.msa.user.presentation.dto.response;
+
+import lombok.Builder;
+import takeoff.logistics_service.msa.user.domain.entity.Employee;
+import takeoff.logistics_service.msa.user.domain.vo.CompanyId;
+import takeoff.logistics_service.msa.user.domain.vo.HubId;
+
+import java.util.UUID;
+@Builder
+public record GetManagerListInfoDto(
+        Long userId,
+        String username,
+        String slackEmail,
+        String role,
+        UUID companyId,
+        UUID hubId
+) {
+    public static GetManagerListInfoDto from(Employee employee) {
+        CompanyId companyId = employee.getCompanyId();
+        HubId hubId = employee.getHubId();
+
+        return GetManagerListInfoDto.builder()
+                .userId(employee.getId())
+                .username(employee.getUsername())
+                .slackEmail(employee.getSlackEmail())
+                .role(employee.getRole().name())
+                .companyId(companyId != null ? companyId.getCompanyIdentifier() : null)
+                .hubId(hubId != null ? hubId.getHubIdentifier() : null)
+                .build();
+    }
+}
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetManagerListInternalResponseDto.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetManagerListInternalResponseDto.java
new file mode 100644
index 00000000..7b530e31
--- /dev/null
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetManagerListInternalResponseDto.java
@@ -0,0 +1,11 @@
+package takeoff.logistics_service.msa.user.presentation.dto.response;
+
+import java.util.List;
+
+public record GetManagerListInternalResponseDto(
+        List<GetManagerListInfoDto> users
+) {
+    public static GetManagerListInternalResponseDto from(List<GetManagerListInfoDto> users) {
+        return new GetManagerListInternalResponseDto(users);
+    }
+}
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetUserListInfoDto.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetUserListInfoDto.java
index 4f269956..1919046d 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetUserListInfoDto.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetUserListInfoDto.java
@@ -3,8 +3,17 @@
 import lombok.Builder;
 import takeoff.logistics_service.msa.user.domain.entity.User;
 
+import java.util.UUID;
+
 @Builder
-public record GetUserListInfoDto(Long userId, String username, String slackEmail, String role) {
+public record GetUserListInfoDto(
+        Long userId,
+        String username,
+        String slackEmail,
+        String role,
+        UUID companyId,
+        UUID hubId
+) {
     public static GetUserListInfoDto from(User user) {
         return GetUserListInfoDto.builder()
                 .userId(user.getId())
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/PatchDeliveryManagerResponseDto.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/PatchDeliveryManagerResponseDto.java
index bab02c93..9b05bfed 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/PatchDeliveryManagerResponseDto.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/PatchDeliveryManagerResponseDto.java
@@ -20,7 +20,7 @@ public static PatchDeliveryManagerResponseDto from(DeliveryManager manager) {
                 .slackEmail(manager.getSlackEmail())
                 .deliveryManagerType(manager.getDeliveryManagerType())
                 .identifier(manager.getIdentifier())
-                .deliverySequence(manager.getDeliverySequence().getValue())
+                .deliverySequence(manager.getDeliverySequence().getSequenceNumber())
                 .build();
     }
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/PostDeliveryManagerResponseDto.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/PostDeliveryManagerResponseDto.java
index c4c824c1..e0665dc6 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/PostDeliveryManagerResponseDto.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/PostDeliveryManagerResponseDto.java
@@ -20,7 +20,7 @@ public static PostDeliveryManagerResponseDto from(DeliveryManager manager) {
                 .slackEmail(manager.getSlackEmail())
                 .deliveryManagerType(manager.getDeliveryManagerType())
                 .identifier(manager.getIdentifier())
-                .deliverySequence(manager.getDeliverySequence().getValue())
+                .deliverySequence(manager.getDeliverySequence().getSequenceNumber())
                 .build();
     }
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/DeliveryManagerInternalController.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/DeliveryManagerInternalController.java
index 0a570f72..9c8b1203 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/DeliveryManagerInternalController.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/DeliveryManagerInternalController.java
@@ -1,13 +1,16 @@
 package takeoff.logistics_service.msa.user.presentation.internal;
 
 import lombok.RequiredArgsConstructor;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
 import takeoff.logistics_service.msa.user.application.service.DeliveryManagerService;
+import takeoff.logistics_service.msa.user.presentation.dto.response.GetDeliveryManagerListInfoDto;
+import takeoff.logistics_service.msa.user.presentation.dto.response.GetDeliveryManagerListInternalResponseDto;
 import takeoff.logistics_service.msa.user.presentation.dto.response.GetDeliveryManagerResponseDto;
 
+import java.util.List;
+import java.util.UUID;
+
 @RestController
 @RequestMapping("/api/v1/app/delivery-managers")
 @RequiredArgsConstructor
@@ -16,7 +19,23 @@ public class DeliveryManagerInternalController {
     private final DeliveryManagerService deliveryManagerService;
 
     @GetMapping("/{id}")
-    public GetDeliveryManagerResponseDto getDeliveryManager(@PathVariable Long id) {
+    public GetDeliveryManagerResponseDto getDeliveryManagerById(@PathVariable Long id) {
         return deliveryManagerService.getDeliveryManagerById(id);
     }
+
+    @GetMapping("/company")
+    public GetDeliveryManagerListInternalResponseDto getCompanyDeliveryManagersByHubId(
+            @RequestParam UUID hubId
+    ) {
+        List<GetDeliveryManagerListInfoDto> list = deliveryManagerService.getCompanyDeliveryManagersByHubId(hubId);
+        return GetDeliveryManagerListInternalResponseDto.from(list);
+    }
+
+    @GetMapping("/hub")
+    public GetDeliveryManagerListInternalResponseDto getAllHubDeliveryManagers() {
+        List<GetDeliveryManagerListInfoDto> list = deliveryManagerService.getAllHubDeliveryManagers();
+        return GetDeliveryManagerListInternalResponseDto.from(list);
+    }
+
+
 }
diff --git a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/UserInternalController.java b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/UserInternalController.java
index 0c2bca2c..89a23ecd 100644
--- a/user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/UserInternalController.java
+++ b/user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/UserInternalController.java
@@ -1,15 +1,14 @@
 package takeoff.logistics_service.msa.user.presentation.internal;
 
-import jakarta.validation.Valid;
 import lombok.RequiredArgsConstructor;
-import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 import takeoff.logistics_service.msa.user.application.service.UserService;
-import takeoff.logistics_service.msa.user.presentation.dto.request.GetUserListRequestDto;
-import takeoff.logistics_service.msa.user.presentation.dto.request.PatchUserRequestDto;
-import takeoff.logistics_service.msa.user.presentation.dto.request.PostSignupRequestDto;
 import takeoff.logistics_service.msa.user.presentation.dto.request.UserValidationRequestDto;
-import takeoff.logistics_service.msa.user.presentation.dto.response.*;
+import takeoff.logistics_service.msa.user.presentation.dto.response.GetManagerListInfoDto;
+import takeoff.logistics_service.msa.user.presentation.dto.response.GetManagerListInternalResponseDto;
+import takeoff.logistics_service.msa.user.presentation.dto.response.UserValidationResponseDto;
+
+import java.util.List;
 
 @RestController
 @RequiredArgsConstructor
@@ -22,4 +21,22 @@ public class UserInternalController {
     public UserValidationResponseDto validateUser(@RequestBody UserValidationRequestDto requestDto) {
         return userService.validateUser(requestDto);
     }
+
+    @GetMapping("/managers/company/users")
+    public GetManagerListInternalResponseDto getUsersByCompanyManager(
+            @RequestParam Long managerId
+    ) {
+        List<GetManagerListInfoDto> list = userService.getUsersByCompanyManagerId(managerId);
+        return GetManagerListInternalResponseDto.from(list);
+    }
+
+    @GetMapping("/managers/hub/users")
+    public GetManagerListInternalResponseDto getUsersByHubManager(
+            @RequestParam Long managerId
+    ) {
+        List<GetManagerListInfoDto> list = userService.getUsersByHubManagerId(managerId);
+        return GetManagerListInternalResponseDto.from(list);
+    }
+
+
 }


Reviews:
user: login: Sodychoe
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-22T07:59:18Z
user: login: 2sminn
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-22T08:20:13Z
user: login: 2sminn
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-22T08:20:39Z
user: login: Sodychoe
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-22T09:41:27Z
user: login: 2sminn
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-22T09:44:24Z
user: login: hyezuu
body: hubId랑, companyId 있는 응답 형식이 어떤걸까요 ..!?ㅠ,ㅠ 못찾았습니다......
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-22T18:44:03Z
user: login: 2sminn
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-23T10:05:12Z
user: login: hyezuu
body: 고생너무많으셨어요 ~!!! ㅠㅠ 감사해요!
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-23T10:08:48Z

Review comments:
diff_hunk: @@ -19,4 +21,22 @@ public class DeliveryManagerInternalController {
     public GetDeliveryManagerResponseDto getDeliveryManager(@PathVariable Long id) {
         return deliveryManagerService.getDeliveryManagerById(id);
     }
+
+    @GetMapping("/company")
+    public ResponseEntity<List<GetDeliveryManagerListInfoDto>> getCompanyDeliveryManagersByHubId(
+            @RequestParam UUID hubId
+    ) {
+        List<GetDeliveryManagerListInfoDto> list = deliveryManagerService.getCompanyDeliveryManagersByHubId(hubId);
+        return ResponseEntity.ok(list);
+    }
+
+    @GetMapping("/hub")
+    public ResponseEntity<List<GetDeliveryManagerListInfoDto>> getHubDeliveryManagersByHubId(
+            @RequestParam UUID hubId
path: user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/DeliveryManagerInternalController.java
user: login: Sodychoe
body: 허브 배송 담당자를 조회할 때 hubId 는 필요없는 거 아닌가요?
created_at: 2025-03-22T07:58:47Z
author_association: COLLABORATOR
diff_hunk: @@ -19,4 +21,22 @@ public class DeliveryManagerInternalController {
     public GetDeliveryManagerResponseDto getDeliveryManager(@PathVariable Long id) {
         return deliveryManagerService.getDeliveryManagerById(id);
     }
+
+    @GetMapping("/company")
+    public ResponseEntity<List<GetDeliveryManagerListInfoDto>> getCompanyDeliveryManagersByHubId(
path: user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/DeliveryManagerInternalController.java
user: login: Sodychoe
body: 내부 컨트롤러라서 ResponseEntity 는 뺴는게 다른곳에서 사용하기 편할 것 같습니다
created_at: 2025-03-22T07:59:14Z
author_association: COLLABORATOR
diff_hunk: @@ -19,4 +21,22 @@ public class DeliveryManagerInternalController {
     public GetDeliveryManagerResponseDto getDeliveryManager(@PathVariable Long id) {
         return deliveryManagerService.getDeliveryManagerById(id);
     }
+
+    @GetMapping("/company")
+    public ResponseEntity<List<GetDeliveryManagerListInfoDto>> getCompanyDeliveryManagersByHubId(
+            @RequestParam UUID hubId
+    ) {
+        List<GetDeliveryManagerListInfoDto> list = deliveryManagerService.getCompanyDeliveryManagersByHubId(hubId);
+        return ResponseEntity.ok(list);
+    }
+
+    @GetMapping("/hub")
+    public ResponseEntity<List<GetDeliveryManagerListInfoDto>> getHubDeliveryManagersByHubId(
+            @RequestParam UUID hubId
path: user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/DeliveryManagerInternalController.java
user: login: 2sminn
body: 허브 배송 담당자는 hubId가 필요없는데, 조회할 방법이 hubId밖에 없어서 @RequestParam으로 조건걸어야해서, 어차피 VO값이라 필드값만 집어넣어놓고, 이 내부 API 사용하는 MS서비스에서 hubId값을 변경할 수 있도록 updateIdentifier(String identifier) 걸어놓았습니다!
created_at: 2025-03-22T08:20:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -19,4 +21,22 @@ public class DeliveryManagerInternalController {
     public GetDeliveryManagerResponseDto getDeliveryManager(@PathVariable Long id) {
         return deliveryManagerService.getDeliveryManagerById(id);
     }
+
+    @GetMapping("/company")
+    public ResponseEntity<List<GetDeliveryManagerListInfoDto>> getCompanyDeliveryManagersByHubId(
path: user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/DeliveryManagerInternalController.java
user: login: 2sminn
body: 흐음,, 수정하겠습니다
created_at: 2025-03-22T08:20:39Z
author_association: CONTRIBUTOR
diff_hunk: @@ -19,4 +21,22 @@ public class DeliveryManagerInternalController {
     public GetDeliveryManagerResponseDto getDeliveryManager(@PathVariable Long id) {
         return deliveryManagerService.getDeliveryManagerById(id);
     }
+
+    @GetMapping("/company")
+    public ResponseEntity<List<GetDeliveryManagerListInfoDto>> getCompanyDeliveryManagersByHubId(
+            @RequestParam UUID hubId
+    ) {
+        List<GetDeliveryManagerListInfoDto> list = deliveryManagerService.getCompanyDeliveryManagersByHubId(hubId);
+        return ResponseEntity.ok(list);
+    }
+
+    @GetMapping("/hub")
+    public ResponseEntity<List<GetDeliveryManagerListInfoDto>> getHubDeliveryManagersByHubId(
+            @RequestParam UUID hubId
path: user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/DeliveryManagerInternalController.java
user: login: Sodychoe
body: 허브 배송 담당자 조회하는 입장에선 허브아이디가 필요가 없는데
어떻게 조회하는건지 이해가 잘 안가요..
created_at: 2025-03-22T09:41:27Z
author_association: COLLABORATOR
diff_hunk: @@ -19,4 +21,22 @@ public class DeliveryManagerInternalController {
     public GetDeliveryManagerResponseDto getDeliveryManager(@PathVariable Long id) {
         return deliveryManagerService.getDeliveryManagerById(id);
     }
+
+    @GetMapping("/company")
+    public ResponseEntity<List<GetDeliveryManagerListInfoDto>> getCompanyDeliveryManagersByHubId(
+            @RequestParam UUID hubId
+    ) {
+        List<GetDeliveryManagerListInfoDto> list = deliveryManagerService.getCompanyDeliveryManagersByHubId(hubId);
+        return ResponseEntity.ok(list);
+    }
+
+    @GetMapping("/hub")
+    public ResponseEntity<List<GetDeliveryManagerListInfoDto>> getHubDeliveryManagersByHubId(
+            @RequestParam UUID hubId
path: user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/DeliveryManagerInternalController.java
user: login: 2sminn
body: 허브 배송 담당자는 배송 경로 및 순번에 따라 해당 허브에 지정이 되지 않나요?? 그 출발 허브ID값을 넣으면 되지 않을까요??
created_at: 2025-03-22T09:44:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -104,5 +107,25 @@ public UserValidationResponseDto validateUser(UserValidationRequestDto requestDt
         return UserValidationResponseDto.from(user);
     }
 
+    @Override
+    public List<GetUserListInfoDto> getUsersByCompanyManagerId(Long managerId) {
+        CompanyManager manager = userRepository.findCompanyManagerById(managerId)
+                .orElseThrow(() -> new IllegalArgumentException("회사 매니저를 찾을 수 없습니다."));
path: user/src/main/java/takeoff/logistics_service/msa/user/application/service/UserServiceImpl.java
user: login: hyezuu
body: 404 예외로 던져주세요~!!
created_at: 2025-03-22T18:39:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -4,7 +4,11 @@
 import takeoff.logistics_service.msa.user.domain.entity.User;
 
 @Builder
-public record GetUserListInfoDto(Long userId, String username, String slackEmail, String role) {
+public record GetUserListInfoDto(
+        Long userId,
+        String username,
+        String slackEmail,
+        String role) {
path: user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetUserListInfoDto.java
user: login: hyezuu
body: 혹시 필드 수정 없는걸까요..!?!?! 
created_at: 2025-03-22T18:43:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -4,7 +4,11 @@
 import takeoff.logistics_service.msa.user.domain.entity.User;
 
 @Builder
-public record GetUserListInfoDto(Long userId, String username, String slackEmail, String role) {
+public record GetUserListInfoDto(
+        Long userId,
+        String username,
+        String slackEmail,
+        String role) {
path: user/src/main/java/takeoff/logistics_service/msa/user/presentation/dto/response/GetUserListInfoDto.java
user: login: 2sminn
body: HubId와 CompanyId는 관리자 입장에서는 불변이라,, 혹시나해서 update메소드도 넣어놓았습니다,,
created_at: 2025-03-23T10:05:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -16,7 +19,23 @@ public class DeliveryManagerInternalController {
     private final DeliveryManagerService deliveryManagerService;
 
     @GetMapping("/{id}")
-    public GetDeliveryManagerResponseDto getDeliveryManager(@PathVariable Long id) {
+    public GetDeliveryManagerResponseDto getDeliveryManagerById(@PathVariable Long id) {
         return deliveryManagerService.getDeliveryManagerById(id);
     }
+
+    @GetMapping("/company")
+    public GetDeliveryManagerListInternalResponseDto getCompanyDeliveryManagersByHubId(
path: user/src/main/java/takeoff/logistics_service/msa/user/presentation/internal/DeliveryManagerInternalController.java
user: login: hyezuu
body: 감사합니다 !!~!!!
created_at: 2025-03-23T10:08:36Z
author_association: CONTRIBUTOR

PR comments:
user: login: 2sminn
created_at: 2025-03-22T07:46:56Z
body: 기다리시느라 고생하셨습니다,,, hubId와 companyId를 어떻게 넘겨받고 넘겨줄지에 대하여 고민 시간때문에 늦어진 것 같은데 완료해놓았습니다!
 
author_association: CONTRIBUTOR
user: login: Sodychoe
created_at: 2025-03-22T08:07:21Z
body: 배송 순번 부여하는 기능이 구현이 안된 것 같은데 맞나요 ?
author_association: COLLABORATOR
user: login: 2sminn
created_at: 2025-03-22T08:26:32Z
body: 배송 순번도 그냥 VO값으로 집어놓았고, 배송 순번을 지정해주는 것은 배송 경로 로직에서 맞춰서 해당 허브에 맞는 배송 순번을 가진 배송 담당자를 지정해주는 것이라고 생각했는데 이 순번도 배송에서 순차적으로 지정해주는 걸로 이해했습니다
author_association: CONTRIBUTOR
user: login: Sodychoe
created_at: 2025-03-22T09:43:03Z
body: > 배송 순번도 그냥 VO값으로 집어놓았고, 배송 순번을 지정해주는 것은 배송 경로 로직에서 맞춰서 해당 허브에 맞는 배송 순번을 가진 배송 담당자를 지정해주는 것이라고 생각했는데 이 순번도 배송에서 순차적으로 지정해주는 걸로 이해했습니다

배송 순번은 유저 서비스에 있고 
요구사항이 순차적으로 순번을 부여하는 거라 다른 배송담당자들의 순번을 알아야하는데 배송 서비스에선 못할것같습니다 
author_association: COLLABORATOR
user: login: 2sminn
created_at: 2025-03-22T09:55:58Z
body: 그러면 사용자 서비스에서 각 허브당 최대 10명이 존재하니까 0-10번까지 배송순번을 순차 배정 로직을 추가하겠습니다. 그러면 업체 배송 담당자는 허브ID를 갖고 있으므로 해당 허브 ID에 몇번의 순번까지 있는지 확인할 수 있으므로 배송 순번 기준으로 배정이 가능할 것 같은데, 허브 배송 담당자는 만약에 해인님 의견대로 허브ID를 갖고 있지 않는다면, 배송 순번을 지정해 줄 수 없습니다,, 배송순번은 해당 허브 ID에 몇번까지의 순번이 있냐를 확인을 하고 다음 순번을 배정해줘야 하기 때문입니다!!
<결론> 생산업체 -> 출발 허브 -> 도착 허브 -> 수령업체
업체 배송 담당자는 도착허브ID(수령업체가 해당 허브ID값을 가지고 있음)값을 가져야 하고
허브 배송 담당자는 출발허브ID(생산업체가 해당 허브ID값을 가지고 있음)값을 가져야 합니다.
=> 두 역할 모두 허브ID를 가지고 있긴 해야 합니다!!
author_association: CONTRIBUTOR