fix(shipping): allow platform scope tracking resources

This commit is contained in:
2026-09-30 13:03:33 +08:00
parent d320e78bbc
commit eae630e60d
2 changed files with 126 additions and 6 deletions
@@ -66,7 +66,6 @@ public class PlatformCarrierScheduleQueryController {
public ApiResponse<PageResult<QueryView>> page(@AuthenticationPrincipal AuthenticatedUser user,
@Valid Query query) {
FirstlegScopeGuard.platform(user);
if (query.customerId() != null) FirstlegScopeGuard.platform(user, query.customerId());
return ApiResponse.success(service.page(query));
}
@@ -74,7 +73,7 @@ public class PlatformCarrierScheduleQueryController {
@PreAuthorize("hasAuthority('platform:firstleg:port-schedule-query:list')")
public ApiResponse<Detail> detail(@AuthenticationPrincipal AuthenticatedUser user,
@PathVariable @Positive long queryId) {
FirstlegScopeGuard.platform(user, service.customerId(queryId));
FirstlegScopeGuard.platform(user);
return ApiResponse.success(service.detail(queryId));
}
@@ -82,7 +81,7 @@ public class PlatformCarrierScheduleQueryController {
@PreAuthorize("hasAuthority('platform:firstleg:port-schedule-query:list')")
public ApiResponse<List<History>> history(
@AuthenticationPrincipal AuthenticatedUser user, @PathVariable @Positive long queryId) {
FirstlegScopeGuard.platform(user, service.customerId(queryId));
FirstlegScopeGuard.platform(user);
return ApiResponse.success(service.history(queryId));
}
@@ -93,7 +92,7 @@ public class PlatformCarrierScheduleQueryController {
public ApiResponse<Detail> create(@AuthenticationPrincipal AuthenticatedUser user,
@RequestHeader("Idempotency-Key") String key,
@Valid @RequestBody CreateRequest request) {
FirstlegScopeGuard.platform(user, request.customerId());
FirstlegScopeGuard.platform(user);
return ApiResponse.success(service.create(user.userId(), user.username(), key, request));
}
@@ -105,7 +104,7 @@ public class PlatformCarrierScheduleQueryController {
@PathVariable @Positive long queryId,
@RequestHeader("Idempotency-Key") String key,
@Valid @RequestBody ManualResultRequest request) {
FirstlegScopeGuard.platform(user, service.customerId(queryId));
FirstlegScopeGuard.platform(user);
return ApiResponse.success(service.attachManualResult(queryId, user.userId(), user.username(), key, request));
}
@@ -118,7 +117,7 @@ public class PlatformCarrierScheduleQueryController {
@PathVariable @Positive long queryId,
@RequestHeader("Idempotency-Key") String key,
@Valid @RequestBody ManualNodeRequest request) {
FirstlegScopeGuard.platform(user, service.customerId(queryId));
FirstlegScopeGuard.platform(user);
return ApiResponse.success(service.addManualNode(queryId, user.userId(), user.username(), key, request));
}
}